Skip to content

Commit 0276f05

Browse files
committed
hereby format
1 parent 572b150 commit 0276f05

1 file changed

Lines changed: 18 additions & 18 deletions

File tree

src/compiler/checker.ts

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -34335,24 +34335,24 @@ export function createTypeChecker(host: TypeCheckerHost): TypeChecker {
3433534335
}
3433634336
}
3433734337

34338-
function isInPropertyInitializerOrClassStaticBlock(node: Node, ignoreArrowFunctions?: boolean): boolean {
34339-
return !!findAncestor(node, node => {
34340-
switch (node.kind) {
34341-
case SyntaxKind.PropertyDeclaration:
34342-
case SyntaxKind.ClassStaticBlockDeclaration:
34343-
return true;
34344-
case SyntaxKind.TypeQuery:
34345-
case SyntaxKind.JsxClosingElement: // already reported in JsxOpeningElement
34346-
return "quit";
34347-
case SyntaxKind.ArrowFunction:
34348-
return ignoreArrowFunctions ? false : "quit";
34349-
case SyntaxKind.Block:
34350-
return isFunctionLikeDeclaration(node.parent) && node.parent.kind !== SyntaxKind.ArrowFunction ? "quit" : false;
34351-
default:
34352-
return false;
34353-
}
34354-
});
34355-
}
34338+
function isInPropertyInitializerOrClassStaticBlock(node: Node, ignoreArrowFunctions?: boolean): boolean {
34339+
return !!findAncestor(node, node => {
34340+
switch (node.kind) {
34341+
case SyntaxKind.PropertyDeclaration:
34342+
case SyntaxKind.ClassStaticBlockDeclaration:
34343+
return true;
34344+
case SyntaxKind.TypeQuery:
34345+
case SyntaxKind.JsxClosingElement: // already reported in JsxOpeningElement
34346+
return "quit";
34347+
case SyntaxKind.ArrowFunction:
34348+
return ignoreArrowFunctions ? false : "quit";
34349+
case SyntaxKind.Block:
34350+
return isFunctionLikeDeclaration(node.parent) && node.parent.kind !== SyntaxKind.ArrowFunction ? "quit" : false;
34351+
default:
34352+
return false;
34353+
}
34354+
});
34355+
}
3435634356

3435734357
/**
3435834358
* It's possible that "prop.valueDeclaration" is a local declaration, but the property was also declared in a superclass.

0 commit comments

Comments
 (0)