MCPcopy Create free account
hub / github.com/colbymchenry/codegraph / isExtractorReceiver

Function isExtractorReceiver

__tests__/language-extractor-hooks.test.ts:51–57  ·  view source on GitHub ↗

`extractor`, `this.extractor`, either one behind `!` or parentheses.

(node: ts.Expression)

Source from the content-addressed store, hash-verified

49
50/** `extractor`, `this.extractor`, either one behind `!` or parentheses. */
51function isExtractorReceiver(node: ts.Expression): boolean {
52 while (ts.isNonNullExpression(node) || ts.isParenthesizedExpression(node)) node = node.expression;
53 if (ts.isIdentifier(node)) return node.text === 'extractor';
54 return ts.isPropertyAccessExpression(node) &&
55 node.expression.kind === ts.SyntaxKind.ThisKeyword &&
56 node.name.text === 'extractor';
57}
58
59function membersRead(): Set<string> {
60 const read = new Set<string>();

Callers 1

visitFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected