MCPcopy Index your code
hub / github.com/nodejs/node / parseTypeMember

Function parseTypeMember

test/fixtures/snapshot/typescript.js:33722–33742  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33720 return false;
33721 }
33722 function parseTypeMember() {
33723 if (token() === 20 /* SyntaxKind.OpenParenToken */ || token() === 29 /* SyntaxKind.LessThanToken */) {
33724 return parseSignatureMember(174 /* SyntaxKind.CallSignature */);
33725 }
33726 if (token() === 103 /* SyntaxKind.NewKeyword */ && lookAhead(nextTokenIsOpenParenOrLessThan)) {
33727 return parseSignatureMember(175 /* SyntaxKind.ConstructSignature */);
33728 }
33729 var pos = getNodePos();
33730 var hasJSDoc = hasPrecedingJSDocComment();
33731 var modifiers = parseModifiers();
33732 if (parseContextualModifier(136 /* SyntaxKind.GetKeyword */)) {
33733 return parseAccessorDeclaration(pos, hasJSDoc, /*decorators*/ undefined, modifiers, 172 /* SyntaxKind.GetAccessor */);
33734 }
33735 if (parseContextualModifier(149 /* SyntaxKind.SetKeyword */)) {
33736 return parseAccessorDeclaration(pos, hasJSDoc, /*decorators*/ undefined, modifiers, 173 /* SyntaxKind.SetAccessor */);
33737 }
33738 if (isIndexSignature()) {
33739 return parseIndexSignatureDeclaration(pos, hasJSDoc, /*decorators*/ undefined, modifiers);
33740 }
33741 return parsePropertyOrMethodSignature(pos, hasJSDoc, modifiers);
33742 }
33743 function nextTokenIsOpenParenOrLessThan() {
33744 nextToken();
33745 return token() === 20 /* SyntaxKind.OpenParenToken */ || token() === 29 /* SyntaxKind.LessThanToken */;

Callers

nothing calls this directly

Calls 11

parseSignatureMemberFunction · 0.85
lookAheadFunction · 0.85
getNodePosFunction · 0.85
hasPrecedingJSDocCommentFunction · 0.85
parseModifiersFunction · 0.85
parseContextualModifierFunction · 0.85
parseAccessorDeclarationFunction · 0.85
isIndexSignatureFunction · 0.85
tokenFunction · 0.70

Tested by

no test coverage detected