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

Function parseTypeAliasDeclaration

test/fixtures/snapshot/typescript.js:36940–36949  ·  view source on GitHub ↗
(pos, hasJSDoc, decorators, modifiers)

Source from the content-addressed store, hash-verified

36938 return withJSDoc(finishNode(node, pos), hasJSDoc);
36939 }
36940 function parseTypeAliasDeclaration(pos, hasJSDoc, decorators, modifiers) {
36941 parseExpected(152 /* SyntaxKind.TypeKeyword */);
36942 var name = parseIdentifier();
36943 var typeParameters = parseTypeParameters();
36944 parseExpected(63 /* SyntaxKind.EqualsToken */);
36945 var type = token() === 138 /* SyntaxKind.IntrinsicKeyword */ && tryParse(parseKeywordAndNoDot) || parseType();
36946 parseSemicolon();
36947 var node = factory.createTypeAliasDeclaration(decorators, modifiers, name, typeParameters, type);
36948 return withJSDoc(finishNode(node, pos), hasJSDoc);
36949 }
36950 // In an ambient declaration, the grammar only allows integer literals as initializers.
36951 // In a non-ambient declaration, the grammar allows uninitialized members only in a
36952 // ConstantEnumMemberSection, which starts at the beginning of an enum declaration

Callers 1

parseDeclarationWorkerFunction · 0.85

Calls 9

parseExpectedFunction · 0.85
parseIdentifierFunction · 0.85
parseTypeParametersFunction · 0.85
tryParseFunction · 0.85
parseTypeFunction · 0.85
parseSemicolonFunction · 0.85
withJSDocFunction · 0.85
finishNodeFunction · 0.85
tokenFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…