Sha256: 40ac27b0fb6b2034ddec72cc4c57baf75c5fa74db0975644ba16464712c5c598

Contents?: true

Size: 540 Bytes

Versions: 9

Compression:

Stored size: 540 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('.').default;
  return getValue(value.expression);
}

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
immosquare-cleaner-0.1.52 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
immosquare-cleaner-0.1.51 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
immosquare-cleaner-0.1.50 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
immosquare-cleaner-0.1.49 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
immosquare-cleaner-0.1.48 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
immosquare-cleaner-0.1.47 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
immosquare-cleaner-0.1.46 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
immosquare-cleaner-0.1.45 node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js
decidim-0.26.8 packages/eslint-config/node_modules/jsx-ast-utils/src/values/expressions/TypeCastExpression.js