UNPKG

eslint-plugin-react-form-fields

Version:
13 lines (12 loc) 474 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getAsPropValue = void 0; const jsx_ast_utils_1 = require("jsx-ast-utils"); const getAsPropValue = (attributes // eslint-disable-next-line @typescript-eslint/no-explicit-any ) => { const asProp = (0, jsx_ast_utils_1.getProp)(attributes, 'as'); const asPropValue = (0, jsx_ast_utils_1.getLiteralPropValue)(asProp); return asPropValue; }; exports.getAsPropValue = getAsPropValue;