Skip to content

Commit 84250e3

Browse files
committed
Increase accuracy of remaining subtype reduction work estimate
1 parent d2909a1 commit 84250e3

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/compiler/checker.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9273,9 +9273,9 @@ namespace ts {
92739273
const source = types[i];
92749274
for (const target of types) {
92759275
if (source !== target) {
9276-
if (count === 10000) {
9277-
// After 10000 subtype checks we estimate the remaining amount of work by assuming the
9278-
// same ratio of checks to removals. If the estimated number of remaining type checks is
9276+
if (count === 100000) {
9277+
// After 100000 subtype checks we estimate the remaining amount of work by assuming the
9278+
// same ratio of checks per element. If the estimated number of remaining type checks is
92799279
// greater than an upper limit we deem the union type too complex to represent. The
92809280
// upper limit is 25M for unions of primitives only, and 1M otherwise. This for example
92819281
// caps union types at 5000 unique literal types and 1000 unique object types.

0 commit comments

Comments
 (0)