(node: Node)
| 39 | |
| 40 | /** Whether `node` is a class a named class expression declares. */ |
| 41 | export function isJsClassExpression(node: Node): boolean { |
| 42 | return node.kind === 'class' && !!node.signature && CLASS_EXPRESSION_REF_LANGUAGES.has(node.language); |
| 43 | } |
| 44 | |
| 45 | /** The end of the text before a class a CommonJS module exports: `module.exports = `, `exports.Router = `, `module.exports.Router = `. */ |
| 46 | const COMMONJS_EXPORT_BEFORE = /(?:^|[^\w$.])(?:module\.)?exports(?:\.[A-Za-z_$][\w$]*)?\s*=\s*$/; |