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

Function createCheckTypeParameterDiagnostic

test/fixtures/snapshot/typescript.js:83965–83980  ·  view source on GitHub ↗
(node, i)

Source from the content-addressed store, hash-verified

83963 }
83964 }
83965 function createCheckTypeParameterDiagnostic(node, i) {
83966 return function () {
83967 if (node.default) {
83968 seenDefault = true;
83969 checkTypeParametersNotReferenced(node.default, typeParameterDeclarations, i);
83970 }
83971 else if (seenDefault) {
83972 error(node, ts.Diagnostics.Required_type_parameters_may_not_follow_optional_type_parameters);
83973 }
83974 for (var j = 0; j < i; j++) {
83975 if (typeParameterDeclarations[j].symbol === node.symbol) {
83976 error(node.name, ts.Diagnostics.Duplicate_identifier_0, ts.declarationNameToString(node.name));
83977 }
83978 }
83979 };
83980 }
83981 }
83982 /** Check that type parameter defaults only reference previously declared type parameters */
83983 function checkTypeParametersNotReferenced(root, typeParameters, index) {

Callers 1

checkTypeParametersFunction · 0.85

Calls 2

errorFunction · 0.70

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…