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

Function isPurelyTypeDeclaration

test/fixtures/snapshot/typescript.js:47736–47748  ·  view source on GitHub ↗
(s)

Source from the content-addressed store, hash-verified

47734 !(ts.isVariableStatement(s) && !(ts.getCombinedNodeFlags(s) & (1 /* NodeFlags.Let */ | 2 /* NodeFlags.Const */)) && s.declarationList.declarations.some(function (d) { return !d.initializer; }));
47735 }
47736 function isPurelyTypeDeclaration(s) {
47737 switch (s.kind) {
47738 case 258 /* SyntaxKind.InterfaceDeclaration */:
47739 case 259 /* SyntaxKind.TypeAliasDeclaration */:
47740 return true;
47741 case 261 /* SyntaxKind.ModuleDeclaration */:
47742 return getModuleInstanceState(s) !== 1 /* ModuleInstanceState.Instantiated */;
47743 case 260 /* SyntaxKind.EnumDeclaration */:
47744 return ts.hasSyntacticModifier(s, 2048 /* ModifierFlags.Const */);
47745 default:
47746 return false;
47747 }
47748 }
47749 function isExportsOrModuleExportsOrAlias(sourceFile, node) {
47750 var i = 0;
47751 var q = [node];

Callers 1

isExecutableStatementFunction · 0.85

Calls 1

getModuleInstanceStateFunction · 0.85

Tested by

no test coverage detected