Sha256: f07dd67aa53631d6a750a4fc3ed7e1443a165dfbbc6784b68bceac128c92dd2a

Contents?: true

Size: 549 Bytes

Versions: 15

Compression:

Stored size: 549 Bytes

Contents

/**
 * Extractor function for a TypeCastExpression type value node.
 * A type cast expression looks like `(this.handleClick: (event: MouseEvent) => void))`
 * This will return the expression `this.handleClick`.
 *
 * @param - value - AST Value object with type `TypeCastExpression`
 * @returns - The extracted value converted to correct type.
 */
export default function extractValueFromTypeCastExpression(value) {
  // eslint-disable-next-line global-require
  const getValue = require('./index.js').default;
  return getValue(value.expression);
}

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
govuk_publishing_components-18.0.0 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
govuk_publishing_components-17.21.0 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
govuk_publishing_components-17.20.0 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
govuk_publishing_components-17.19.1 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
govuk_publishing_components-17.19.0 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
govuk_publishing_components-17.18.0 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
govuk_publishing_components-17.17.0 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
govuk_publishing_components-17.16.0 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
govuk_publishing_components-17.15.0 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
govuk_publishing_components-17.14.0 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
govuk_publishing_components-17.13.0 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
govuk_publishing_components-17.12.2 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
govuk_publishing_components-17.12.1 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
govuk_publishing_components-17.12.0 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
govuk_publishing_components-17.11.0 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js