1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | 24x 24x 24x 24x | // @flow import type {Path} from './types'; function isPropsClassProperty(path: Path) { return ( path.isClassProperty() && !path.node.computed && !path.node.static && path.node.key.name === 'props' ); } export default function findPropsClassProperty(classBody: Path): Path | false { for (let item of classBody.get('body')) { Eif (isPropsClassProperty(item)) { return item; } } return false; } |