Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
No errors on apparent type of bigint or symbol, even for recent targe…
…ts (#49104) * Remove bigint from Object.freeze in es5.d.ts `BigInt` isn't resolved whenever `lib < es2020`, but it's not an error when `target < es2020`. I have a few ideas for improving this situation but for the RC I'm going to remove `bigint` from Object.freeze's signature. * Update other baselines * No errors for missing apparent type of bigint,symbol for any target * Update test text
- Loading branch information
Showing
15 changed files
with
66 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/contextualSignatureInObjectFreeze.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
//// [contextualSignatureInObjectFreeze.ts] | ||
// #49101 | ||
|
||
Object.freeze({ | ||
f: function () { } | ||
}) | ||
|
||
|
||
//// [contextualSignatureInObjectFreeze.js] | ||
// #49101 | ||
Object.freeze({ | ||
f: function () { } | ||
}); |
13 changes: 13 additions & 0 deletions
13
tests/baselines/reference/contextualSignatureInObjectFreeze.symbols
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
=== tests/cases/compiler/contextualSignatureInObjectFreeze.ts === | ||
// #49101 | ||
|
||
Object.freeze({ | ||
>Object.freeze : Symbol(ObjectConstructor.freeze, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) | ||
>Object : Symbol(Object, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) | ||
>freeze : Symbol(ObjectConstructor.freeze, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) | ||
|
||
f: function () { } | ||
>f : Symbol(f, Decl(contextualSignatureInObjectFreeze.ts, 2, 15)) | ||
|
||
}) | ||
|
16 changes: 16 additions & 0 deletions
16
tests/baselines/reference/contextualSignatureInObjectFreeze.types
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
=== tests/cases/compiler/contextualSignatureInObjectFreeze.ts === | ||
// #49101 | ||
|
||
Object.freeze({ | ||
>Object.freeze({ f: function () { }}) : Readonly<{ f: () => void; }> | ||
>Object.freeze : { <T>(a: T[]): readonly T[]; <T extends Function>(f: T): T; <T extends { [idx: string]: object | U; }, U extends string | number | bigint | boolean | symbol>(o: T): Readonly<T>; <T>(o: T): Readonly<T>; } | ||
>Object : ObjectConstructor | ||
>freeze : { <T>(a: T[]): readonly T[]; <T extends Function>(f: T): T; <T extends { [idx: string]: object | U; }, U extends string | number | bigint | boolean | symbol>(o: T): Readonly<T>; <T>(o: T): Readonly<T>; } | ||
>{ f: function () { }} : { f: () => void; } | ||
|
||
f: function () { } | ||
>f : () => void | ||
>function () { } : () => void | ||
|
||
}) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// #49101 | ||
// @target: es2020 | ||
// @lib: es2019 | ||
|
||
Object.freeze({ | ||
f: function () { } | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters