Skip to content

Commit 6e4755b

Browse files
author
Andy Hanson
committed
Add CheckMode.JustType to signal to checkClassExpression to just return the type
1 parent ffb4dd5 commit 6e4755b

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/compiler/checker.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -577,9 +577,10 @@ namespace ts {
577577

578578
const enum CheckMode {
579579
Normal = 0, // Normal type checking
580-
SkipContextSensitive = 1, // Skip context sensitive function expressions
581-
Inferential = 2, // Inferential typing
582-
Contextual = 3, // Normal type checking informed by a contextual type, therefore not cacheable
580+
JustType = 1, // Just return a type and don't report errors
581+
SkipContextSensitive = 2, // Skip context sensitive function expressions
582+
Inferential = 3, // Inferential typing
583+
Contextual = 4, // Normal type checking informed by a contextual type, therefore not cacheable
583584
}
584585

585586
const enum CallbackCheck {
@@ -19697,7 +19698,7 @@ namespace ts {
1969719698
// Otherwise simply call checkExpression. Ideally, the entire family of checkXXX functions
1969819699
// should have a parameter that indicates whether full error checking is required such that
1969919700
// we can perform the optimizations locally.
19700-
return cache ? checkExpressionCached(node) : checkExpression(node);
19701+
return cache ? checkExpressionCached(node) : checkExpression(node, CheckMode.JustType);
1970119702
}
1970219703

1970319704
/**

0 commit comments

Comments
 (0)