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

Function classDeclarationExtendsNull

test/fixtures/snapshot/typescript.js:71918–71923  ·  view source on GitHub ↗

* Check if the given class-declaration extends null then return true. * Otherwise, return false * @param classDecl a class declaration to check if it extends null

(classDecl)

Source from the content-addressed store, hash-verified

71916 * @param classDecl a class declaration to check if it extends null
71917 */
71918 function classDeclarationExtendsNull(classDecl) {
71919 var classSymbol = getSymbolOfNode(classDecl);
71920 var classInstanceType = getDeclaredTypeOfSymbol(classSymbol);
71921 var baseConstructorType = getBaseConstructorTypeOfClass(classInstanceType);
71922 return baseConstructorType === nullWideningType;
71923 }
71924 function checkThisBeforeSuper(node, container, diagnosticMessage) {
71925 var containingClassDecl = container.parent;
71926 var baseTypeNode = ts.getClassExtendsHeritageElement(containingClassDecl);

Callers 2

checkThisBeforeSuperFunction · 0.85

Calls 3

getSymbolOfNodeFunction · 0.85
getDeclaredTypeOfSymbolFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…