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

Function checkNamedTupleMember

test/fixtures/snapshot/typescript.js:80885–80897  ·  view source on GitHub ↗
(node)

Source from the content-addressed store, hash-verified

80883 getTypeFromTypeNode(node);
80884 }
80885 function checkNamedTupleMember(node) {
80886 if (node.dotDotDotToken && node.questionToken) {
80887 grammarErrorOnNode(node, ts.Diagnostics.A_tuple_member_cannot_be_both_optional_and_rest);
80888 }
80889 if (node.type.kind === 185 /* SyntaxKind.OptionalType */) {
80890 grammarErrorOnNode(node.type, ts.Diagnostics.A_labeled_tuple_element_is_declared_as_optional_with_a_question_mark_after_the_name_and_before_the_colon_rather_than_after_the_type);
80891 }
80892 if (node.type.kind === 186 /* SyntaxKind.RestType */) {
80893 grammarErrorOnNode(node.type, ts.Diagnostics.A_labeled_tuple_element_is_declared_as_rest_with_a_before_the_name_rather_than_before_the_type);
80894 }
80895 checkSourceElement(node.type);
80896 getTypeFromTypeNode(node);
80897 }
80898 function isPrivateWithinAmbient(node) {
80899 return (ts.hasEffectiveModifier(node, 8 /* ModifierFlags.Private */) || ts.isPrivateIdentifierClassElementDeclaration(node)) && !!(node.flags & 16777216 /* NodeFlags.Ambient */);
80900 }

Callers 1

checkSourceElementWorkerFunction · 0.85

Calls 3

grammarErrorOnNodeFunction · 0.85
checkSourceElementFunction · 0.85
getTypeFromTypeNodeFunction · 0.85

Tested by

no test coverage detected