MCPcopy Create free account
hub / github.com/microsoft/typescript-go / classDeclarationExtendsNull

Method classDeclarationExtendsNull

internal/checker/checker.go:12249–12254  ·  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 *ast.Node)

Source from the content-addressed store, hash-verified

12247 * @param classDecl a class declaration to check if it extends null
12248 */
12249func (c *Checker) classDeclarationExtendsNull(classDecl *ast.Node) bool {
12250 classSymbol := c.getSymbolOfDeclaration(classDecl)
12251 classInstanceType := c.getDeclaredTypeOfSymbol(classSymbol)
12252 baseConstructorType := c.getBaseConstructorTypeOfClass(classInstanceType)
12253 return baseConstructorType == c.nullWideningType
12254}
12255
12256func (c *Checker) checkAssertion(node *ast.Node, checkMode CheckMode) *Type {
12257 if node.Kind == ast.KindTypeAssertionExpression {

Callers 3

checkSuperExpressionMethod · 0.95
checkThisBeforeSuperMethod · 0.95

Tested by

no test coverage detected