Skip to content

Commit 1d3f7ae

Browse files
authored
Start targeting TS 6.0 behavior (#2689)
1 parent 72b3f2f commit 1d3f7ae

26,992 files changed

Lines changed: 418081 additions & 357593 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.github/ISSUE_TEMPLATE/02-behavior-difference.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
name: Behavior Difference
3-
about: tsgo produces different results than TypeScript 5.9
3+
about: tsgo produces different results than TypeScript 6.0
44
title: ''
55
labels: ''
66
assignees: ''
@@ -11,6 +11,6 @@ assignees: ''
1111

1212
<!-- Share a repository link or a code sample -->
1313

14-
## Behavior with `typescript@5.9`
14+
## Behavior with `typescript@6.0`
1515

1616
## Behavior with `tsgo`

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,11 +27,11 @@ This is still a work in progress and is not yet at full feature parity with Type
2727

2828
| Feature | Status | Notes |
2929
|---------|--------|-------|
30-
| Program creation | done | Same files and module resolution as TS 5.9. Not all resolution modes supported yet. |
31-
| Parsing/scanning | done | Exact same syntax errors as TS 5.9 |
30+
| Program creation | done | Same files and module resolution as TS 6.0. Not all resolution modes supported yet. |
31+
| Parsing/scanning | done | Exact same syntax errors as TS 6.0 |
3232
| Commandline and `tsconfig.json` parsing | done | Done, though `tsconfig` errors may not be as helpful. |
33-
| Type resolution | done | Same types as TS 5.9. |
34-
| Type checking | done | Same errors, locations, and messages as TS 5.9. Types printback in errors may display differently. |
33+
| Type resolution | done | Same types as TS 6.0. |
34+
| Type checking | done | Same errors, locations, and messages as TS 6.0. Types printback in errors may display differently. |
3535
| JavaScript-specific inference and JSDoc | in progress | Mostly complete, but intentionally lacking some features. Declaration emit not complete. |
3636
| JSX | done | - |
3737
| Declaration emit | in progress | Most common features are in place, but some edge cases and feature flags are still unhandled. |
@@ -54,7 +54,7 @@ Definitions:
5454
Long-term, we expect that this repo and its contents will be merged into `microsoft/TypeScript`.
5555
As a result, the repo and issue tracker for typescript-go will eventually be closed, so treat discussions/issues accordingly.
5656

57-
For a list of intentional changes with respect to TypeScript 5.9, see CHANGES.md.
57+
For a list of intentional changes with respect to TypeScript 6.0, see CHANGES.md.
5858

5959
## Contributing
6060

_submodules/TypeScript

Submodule TypeScript updated 44027 files

internal/bundled/embed_generated.go

Lines changed: 4 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

internal/bundled/generate.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -188,7 +188,7 @@ func readLibs() []lib {
188188

189189
var libs []lib
190190
for _, libName := range libNames {
191-
sources := []string{"header.d.ts", libName + ".d.ts"}
191+
sources := []string{libName + ".d.ts"}
192192
var target string
193193
if path, ok := paths[libName]; ok {
194194
target = path

internal/bundled/libs/lib.d.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ License at http://www.apache.org/licenses/LICENSE-2.0
77
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
88
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
99
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10-
MERCHANTABLITY OR NON-INFRINGEMENT.
10+
MERCHANTABILITY OR NON-INFRINGEMENT.
1111
1212
See the Apache Version 2.0 License for specific language governing permissions
1313
and limitations under the License.
1414
***************************************************************************** */
1515

1616

17-
/// <reference no-default-lib="true"/>
18-
1917
/// <reference lib="es5" />
2018
/// <reference lib="dom" />
2119
/// <reference lib="webworker.importscripts" />

internal/bundled/libs/lib.decorators.d.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ License at http://www.apache.org/licenses/LICENSE-2.0
77
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
88
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
99
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10-
MERCHANTABLITY OR NON-INFRINGEMENT.
10+
MERCHANTABILITY OR NON-INFRINGEMENT.
1111
1212
See the Apache Version 2.0 License for specific language governing permissions
1313
and limitations under the License.
1414
***************************************************************************** */
1515

1616

17-
/// <reference no-default-lib="true"/>
18-
1917
/**
2018
* The decorator context types provided to class element decorators.
2119
*/

internal/bundled/libs/lib.decorators.legacy.d.ts

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,13 @@ License at http://www.apache.org/licenses/LICENSE-2.0
77
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
88
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
99
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10-
MERCHANTABLITY OR NON-INFRINGEMENT.
10+
MERCHANTABILITY OR NON-INFRINGEMENT.
1111
1212
See the Apache Version 2.0 License for specific language governing permissions
1313
and limitations under the License.
1414
***************************************************************************** */
1515

1616

17-
/// <reference no-default-lib="true"/>
18-
1917
declare type ClassDecorator = <TFunction extends Function>(target: TFunction) => TFunction | void;
2018
declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) => void;
2119
declare type MethodDecorator = <T>(target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;

internal/bundled/libs/lib.dom.asynciterable.d.ts

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,12 @@ License at http://www.apache.org/licenses/LICENSE-2.0
77
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
88
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
99
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
10-
MERCHANTABLITY OR NON-INFRINGEMENT.
10+
MERCHANTABILITY OR NON-INFRINGEMENT.
1111
1212
See the Apache Version 2.0 License for specific language governing permissions
1313
and limitations under the License.
1414
***************************************************************************** */
1515

1616

17-
/// <reference no-default-lib="true"/>
18-
19-
/////////////////////////////
20-
/// Window Async Iterable APIs
21-
/////////////////////////////
22-
23-
interface FileSystemDirectoryHandleAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
24-
[Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<T>;
25-
}
26-
27-
interface FileSystemDirectoryHandle {
28-
[Symbol.asyncIterator](): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
29-
entries(): FileSystemDirectoryHandleAsyncIterator<[string, FileSystemHandle]>;
30-
keys(): FileSystemDirectoryHandleAsyncIterator<string>;
31-
values(): FileSystemDirectoryHandleAsyncIterator<FileSystemHandle>;
32-
}
33-
34-
interface ReadableStreamAsyncIterator<T> extends AsyncIteratorObject<T, BuiltinIteratorReturn, unknown> {
35-
[Symbol.asyncIterator](): ReadableStreamAsyncIterator<T>;
36-
}
37-
38-
interface ReadableStream<R = any> {
39-
[Symbol.asyncIterator](options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
40-
values(options?: ReadableStreamIteratorOptions): ReadableStreamAsyncIterator<R>;
41-
}
17+
// This file's contents are now included in the main types file.
18+
// The file has been left for backward compatibility.

0 commit comments

Comments
 (0)