microsoft / microsoft/TypeScript
Google feedback on TS 6.0-beta
- Ngôn ngữ chính
- Go
- Star
- 111k
- Fork
- 14.3k
- Merge trung bình
- 2 ngày 4 giờ
- Pull request đã merge (30 ngày)
- 132
Mô tả
### Acknowledgement
- [x] I acknowledge that issues using this template may be closed without further explanation at the maintainer's discretion.
### Comment
This GitHub issue contains feedback on the TS 6.0-beta release from the team
that is responsible for keeping Google's internal software working with the
latest version of TypeScript.
## Executive summary
- We do not expect to have significant difficulty in upgrading Google to TS
6.0.
- Some changes to our TypeScript code are required to fix compilation.
- Most of the new errors are clearly related to announced changes.
- Detail sections below explain the changes we expect to make to unblock
the upgrade.
- We expect some deprecations to cause difficulty upgrading to TS 7.0.
- We plan to provide feedback about this at a later date.
## Impact summary
| Change description | Announced | Libraries affected |
| ------------------------------------- | --------: | -----------------: |
| `strict` defaults to `true` | Yes | ~0.1% |
| Legacy `module` syntax for namespaces deprecated | Yes | ~0.02% |
The **Announced** column indicates whether we were able to connect the observed
change with a section in the [TS6.0-beta announcement](https://devblogs.microsoft.com/typescript/announcing-typescript-6-0-beta/).
The following sections give more detailed explanations of the changes listed
above.
## Announced changes for TS 6.0
### `strict` now defaults to `true`
We support this change.
We will set `strict` to `false` until we clean up newly revealed errors in our
codebase. We have not previously enabled `strictBuiltinIteratorReturn` and
`alwaysStrict`.
### `lib.d.ts` changes
We support these changes.
As part of this migration, for impacted `.d.ts` files, we will update
conflicting typings where necessary. For impacted `.ts` files, we will add
`// @ts-ignore` suppressions to silence pre-existing errors with a note advising
code authors to revisit the code and fix these genuine problems.
### `module` syntax for namespaces is deprecated
We support this change.
We will update usages of `module` that declare namespaces to `namespace`.
### `"ignoreDeprecations": "6.0"`
We will set this in order to roll out TS 6.0 as soon as possible. We plan to
provide additional feedback about the impact of these deprecations on TS 7.0 at
a later date.
## Deprecations affecting TS 7.0
The following deprecations do not affect our adoption of TS 6.0 but will need to
be addressed before we adopt TS 7.0.
### `es5` and `--downlevelIteration` deprecation
We currently use ES5 output for a small number of legacy development purposes
and are exploring using another transpiler to continue producing it in the
future.
### `--baseUrl` deprecation
We have resolved this issue by prepending the previous `baseUrl` value to our
path mapping.
### `--esModuleInterop false` and `--allowSyntheticDefaultImports false` deprecations
We have code patterns that rely on setting these options to true and will be
evaluating how to proceed.
### Other changes
We support the following changes but have nothing else to add:
- `es2025` option for `target` and `lib`
- New types for `Temporal`
- New types for "upsert" methods
- `Regexp.escape`
The following changes are largely irrelevant in our codebase and we don't have
anything to add about them:
- Subpath imports starting with `#/`
- Combining `--moduleResolution` bundler with `--module commonjs`
- `rootDir` now defaults to `.`
- `types` now defaults to `[]`
- Other default changes
- Other deprecations
## Unannounced changes
We were not able to associate any new breakages with specific unannounced
changes. If we find any, we will update this.
Hướng dẫn đóng góp
Hướng nghiên cứu
Đọc thông báo về TS 6.0-beta và các phần của issue đề cập đến các giá trị mặc định nghiêm ngặt, lib.d.ts, cú pháp namespace và các nội dung ngừng dùng. Không có tệp mã nguồn, bài kiểm thử, entry point hay thay đổi cụ thể nào của compiler được nêu; cần có một lỗi hỏng có thể tái hiện cụ thể hoặc một thay đổi được yêu cầu để xác định thế nào là hoàn thành.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- typescript
- Lĩnh vực
- compilers
- Loại issue
- Lỗi
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Cần làm rõ
- Mức phù hợp với người mới
- 20/100