(path: NodePath<any>)
| 22 | ]) |
| 23 | |
| 24 | function evaluatePath(path: NodePath<any>): string { |
| 25 | const evaluated = path.evaluate() |
| 26 | if (evaluated.confident) { |
| 27 | return evaluated.value |
| 28 | } |
| 29 | |
| 30 | throw path.buildCodeFrameError( |
| 31 | '[React Intl] Messages must be statically evaluate-able for extraction.' |
| 32 | ) |
| 33 | } |
| 34 | |
| 35 | export function getMessageDescriptorKey(path: NodePath<any>): string { |
| 36 | if (path.isIdentifier() || path.isJSXIdentifier()) { |
no outgoing calls
no test coverage detected