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