Skip to content

Commit 906c503

Browse files
committed
Skip unnecessary work more thoroughly
1 parent 2e2dfd4 commit 906c503

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/compiler/checker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35668,7 +35668,7 @@ namespace ts {
3566835668
checkSourceElementWorker(node);
3566935669

3567035670
// Never report expensive statements in .d.ts files
35671-
if (!checkingDtsFile) {
35671+
if (!checkingDtsFile && maxExpensiveStatementCount > 0) {
3567235672
if (node.kind >= SyntaxKind.FirstStatement && node.kind <= SyntaxKind.LastStatement ||
3567335673
node.kind === SyntaxKind.TypeAliasDeclaration ||
3567435674
node.kind === SyntaxKind.InterfaceDeclaration) {

0 commit comments

Comments
 (0)