A class expression's head, `class Widget extends Base`: its text up to the body. Mirrored in the kernel (tsjs extract_class).
(source: string, node: SyntaxNode, body: SyntaxNode)
| 479 | |
| 480 | /** A class expression's head, `class Widget extends Base`: its text up to the body. Mirrored in the kernel (tsjs extract_class). */ |
| 481 | function classExpressionHead(source: string, node: SyntaxNode, body: SyntaxNode): string { |
| 482 | return source.substring(node.startIndex, body.startIndex).replace(/[ \t\r\n]+$/, ''); |
| 483 | } |
| 484 | |
| 485 | /** Receiver node types (TS/JS grammars) that continue a member chain downward. */ |
| 486 | const TS_JS_CHAIN_RECEIVER_TYPES = new Set(['member_expression', 'subscript_expression']); |