Skip to content

Commit 042b96c

Browse files
committed
Merge branch 'main' into debug-module
2 parents ad8d601 + 1982349 commit 042b96c

File tree

4,761 files changed

+481505
-144954
lines changed

Some content is hidden

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

4,761 files changed

+481505
-144954
lines changed

.dprint.jsonc

+8-3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030
"importDeclaration.sortNamedImports": "maintain"
3131
},
3232
"prettier": {
33+
"newLineKind": "lf",
3334
"associations": [
3435
"**/*.{yaml,yml}"
3536
],
@@ -38,6 +39,10 @@
3839
"yml.singleQuote": true,
3940
"yaml.singleQuote": true
4041
},
42+
"json": {
43+
// This would be good to do in known-JSONC files, but VS Code warns on trailing commas.
44+
"trailingCommas": "never"
45+
},
4146
"excludes": [
4247
"**/node_modules",
4348
"**/*-lock.json",
@@ -51,8 +56,8 @@
5156
],
5257
// Note: if adding new languages, make sure settings.template.json is updated too.
5358
"plugins": [
54-
"https://plugins.dprint.dev/typescript-0.87.1.wasm",
55-
"https://plugins.dprint.dev/prettier-0.27.0.json@3557a62b4507c55a47d8cde0683195b14d13c41dda66d0f0b0e111aed107e2fe",
56-
"https://plugins.dprint.dev/json-0.17.4.wasm"
59+
"https://plugins.dprint.dev/typescript-0.88.9.wasm",
60+
"https://plugins.dprint.dev/json-0.19.1.wasm",
61+
"https://plugins.dprint.dev/prettier-0.35.0.json@0df49c4d878bb1051af2fa1d1f69ba6400f4b78633f49baa1f38954a6fd32b40"
5762
]
5863
}
File renamed without changes.

.github/ISSUE_TEMPLATE/bug_report.yml

+8-10
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ body:
1313
1414
List them here so people in the future can find this one more easily.
1515
placeholder: |
16-
List of keywords you searched for before creating this issue.
17-
Write them down here so that others can find this bug more easily and help provide feedback.
16+
List of keywords you searched for before creating this issue. Write them down here so that others can find this bug more easily and help provide feedback.
1817
1918
e.g. "function inference any", "jsx attribute spread", "move to file duplicate imports", "discriminated union inference", "ts2822"
2019
validations:
@@ -26,21 +25,19 @@ body:
2625
description: |
2726
When did you start seeing this bug occur?
2827
29-
"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
30-
https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs
28+
"Bugs" that have existed in TS for a long time are very likely to be FAQs; please refer to the [FAQ wiki page](https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs).
3129
30+
Please try the nightly version of TS to see if it's already been fixed. Install `typescript@next` or use the [Playground](http://www.typescriptlang.org/play/?ts=Nightly).
3231
33-
If possible, please try testing the nightly version of TS to see if it's already been fixed. For npm: `typescript@next`
32+
If possible, try bisecting the issue using [every-ts](https://www.npmjs.com/package/every-ts#bisecting), which should narrow down the problem to a specific change.
3433
35-
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
36-
37-
38-
Note: The TypeScript Playground can be used to try older versions of TypeScript.
34+
The Playground also supports versions of TypeScript back to TypeScript 3.3.
3935
4036
Please keep and fill in the line that best applies.
4137
value: |
4238
- This is a crash
4339
- This changed between versions ______ and _______
40+
- This changed in commit or PR _______
4441
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
4542
- I was unable to test this on prior versions because _______
4643
validations:
@@ -54,7 +51,6 @@ body:
5451
5552
This should have the same code as the code snippet below, and use whichever settings are relevant to your report.
5653
57-
5854
As a last resort, you can link to a repo, but these will be slower for us to investigate.
5955
placeholder: 'Playground link with relevant code: https://www.typescriptlang.org/play?#code/PTAEFkE9QYwewCYFNQHM5IM6gBZIE5JA'
6056
validations:
@@ -65,6 +61,7 @@ body:
6561
label: 💻 Code
6662
description: |
6763
Please post the relevant code sample here as well.
64+
6865
This code and the Playground code should be the same, do not use separate examples.
6966
7067
We can quickly address your report if:
@@ -74,6 +71,7 @@ body:
7471
- The incorrectness of the behavior is readily apparent from reading the sample.
7572
7673
Reports are slower to investigate if:
74+
7775
- We have to pare too much extraneous code.
7876
- We have to clone a large repo and validate that the problem isn't elsewhere.
7977
- The sample is confusing or doesn't clearly demonstrate what's wrong.

.github/ISSUE_TEMPLATE/config.yml

+15-15
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
---
2-
blank_issues_enabled: false
3-
contact_links:
4-
- about: 'Please ask and answer usage questions on Stack Overflow.'
5-
name: Question
6-
url: 'https://stackoverflow.com/questions/tagged/typescript'
7-
- about: 'Alternatively, you can use the TypeScript Community Discord.'
8-
name: Chat
9-
url: 'https://discord.gg/typescript'
10-
- about: 'Please check the FAQ before filing new issues'
11-
name: 'TypeScript FAQ'
12-
url: 'https://github.com/microsoft/TypeScript/wiki/FAQ'
13-
- about: 'Please raise issues about the site on its own repo.'
14-
name: Website
15-
url: 'https://github.com/microsoft/TypeScript-Website/issues/new'
1+
---
2+
blank_issues_enabled: false
3+
contact_links:
4+
- about: 'Please ask and answer usage questions on Stack Overflow.'
5+
name: Question
6+
url: 'https://stackoverflow.com/questions/tagged/typescript'
7+
- about: 'Alternatively, you can use the TypeScript Community Discord.'
8+
name: Chat
9+
url: 'https://discord.gg/typescript'
10+
- about: 'Please check the FAQ before filing new issues'
11+
name: 'TypeScript FAQ'
12+
url: 'https://github.com/microsoft/TypeScript/wiki/FAQ'
13+
- about: 'Please raise issues about the site on its own repo.'
14+
name: Website
15+
url: 'https://github.com/microsoft/TypeScript-Website/issues/new'

.github/ISSUE_TEMPLATE/feature_request.yml

+5-7
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,7 @@ body:
1515
1616
The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests
1717
placeholder: |
18-
List of keywords you searched for before creating this issue.
19-
Write them down here so that others can find this suggestion more easily and help provide feedback.
18+
List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily and help provide feedback.
2019
2120
e.g. "isArray readonly", "regex string types", "json const assertion import"
2221
validations:
@@ -26,9 +25,7 @@ body:
2625
attributes:
2726
label: '✅ Viability Checklist'
2827
description: |
29-
Suggestions that don't meet all these criteria are very, very unlikely to be accepted.
30-
We always recommend reviewing the TypeScript design goals before investing time writing
31-
a proposal for ideas outside the scope of the project.
28+
Suggestions that don't meet all these criteria are very, very unlikely to be accepted. We always recommend reviewing the TypeScript design goals before investing time writing a proposal for ideas outside the scope of the project.
3229
3330
My suggestion meets the following guidelines.
3431
options:
@@ -40,6 +37,8 @@ body:
4037
required: true
4138
- label: This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
4239
required: true
40+
- label: "This isn't a request to add a new utility type: https://github.com/microsoft/TypeScript/wiki/No-New-Utility-Types"
41+
required: true
4342
- label: 'This feature would agree with the rest of our Design Goals: https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals'
4443
required: true
4544
- type: textarea
@@ -54,8 +53,7 @@ body:
5453
attributes:
5554
label: '📃 Motivating Example'
5655
description: |
57-
If you were announcing this feature in a blog post, what's a short
58-
explanation that shows a developer why this feature improves the language?
56+
If you were announcing this feature in a blog post, what's a short explanation that shows a developer why this feature improves the language?
5957
validations:
6058
required: true
6159
- type: textarea

.github/ISSUE_TEMPLATE/lib_change.yml

+5-11
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: 'Library change'
2-
description: 'Fix or improve issues with built-in type definitions like `lib.dom.d.ts`, `lib.es6.d.ts`, etc.'
2+
description: 'Fix or improve issues with built-in type definitions like `lib.es6.d.ts`, etc.'
33
body:
44
- type: markdown
55
attributes:
@@ -12,18 +12,13 @@ body:
1212
* Array methods - see https://github.com/microsoft/TypeScript/issues/36554
1313
* `parseInt`, `parseFloat`, `isFinite`, `isNaN`, etc. - see https://github.com/microsoft/TypeScript/issues/4002
1414
15-
16-
The DOM lib is maintained elsewhere and you can skip a step by filing issues/PRs for the DOM at that repo.
17-
See https://github.com/microsoft/TypeScript-DOM-lib-generator
15+
The DOM lib is maintained elsewhere and you can skip a step by filing issues/PRs for the DOM at that repo. See https://github.com/microsoft/TypeScript-DOM-lib-generator
1816
- type: markdown
1917
attributes:
2018
value: |
21-
If you're missing common new methods like `Array.includes`, you may have a misconfigured project.
22-
Try setting `lib: "es2020"` and checking whether the type you want is present.
23-
You can diagnose further by running `tsc` with `--listFilesOnly` or `--showConfig`.
19+
If you're missing common new methods like `Array.includes`, you may have a misconfigured project. Try setting `lib: "es2020"` and checking whether the type you want is present. You can diagnose further by running `tsc` with `--listFilesOnly` or `--showConfig`.
2420
25-
Conversely, if you are seeing built-in methods you expect to *not* see, check your 'lib' setting or review your dependencies for lib/reference directives that might be polluting
26-
your global scope. This is common when using the 'node' type library. See https://github.com/microsoft/TypeScript/issues/40184
21+
Conversely, if you are seeing built-in methods you expect to *not* see, check your 'lib' setting or review your dependencies for lib/reference directives that might be polluting your global scope. This is common when using the 'node' type library. See https://github.com/microsoft/TypeScript/issues/40184
2722
- type: input
2823
id: compilation_target
2924
attributes:
@@ -58,5 +53,4 @@ body:
5853
attributes:
5954
label: 'Documentation Link'
6055
description: |
61-
Link to relevant documentation (e.g. MDN, W3C, ECMAScript Spec) to consult for this property.
62-
Note that lib.dom.d.ts intentionally does not include browser-specific extensions or early experimental features.
56+
Link to relevant documentation (e.g. MDN, W3C, ECMAScript Spec) to consult for this property. Note that lib.dom.d.ts intentionally does not include browser-specific extensions or early experimental features.

.github/ISSUE_TEMPLATE/module_resolution.yml

+1-2
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,7 @@ body:
2727
4. The configuration of the target module
2828
5. A difference in runtime behavior
2929
30-
You will also be required to post a cloneable repository.
31-
This repo must involve running `tsc`, not a third-party tool (e.g. vue-tsc, ngc, expo, ...)
30+
You will also be required to post a cloneable repository. This repo must involve running `tsc`, not a third-party tool (e.g. vue-tsc, ngc, expo, ...)
3231
3332
- type: input
3433
id: repo-url

.github/dependabot.yml

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# To get started with Dependabot version updates, you'll need to specify which
2+
# package ecosystems to update and where the package manifests are located.
3+
# Please see the documentation for all configuration options:
4+
# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
5+
6+
version: 2
7+
updates:
8+
- package-ecosystem: 'github-actions'
9+
directory: '/'
10+
schedule:
11+
interval: 'weekly'
12+
groups:
13+
github-actions:
14+
patterns:
15+
- '*'

.github/pr_owners.txt

+1
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ jakebailey
1313
DanielRosenwasser
1414
navya9singh
1515
iisaduan
16+
dependabot

.github/workflows/accept-baselines-fix-lints.yaml

+4-5
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,11 @@ jobs:
1616
build:
1717
runs-on: ubuntu-latest
1818

19-
permissions:
20-
contents: write
21-
2219
steps:
23-
- uses: actions/checkout@v3
24-
- uses: actions/setup-node@v3
20+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
21+
with:
22+
token: ${{ secrets.TS_BOT_GITHUB_TOKEN }}
23+
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
2524

2625
- name: Configure Git, Run Tests, Update Baselines, Apply Fixes
2726
run: |

.github/workflows/ci.yml

+22-22
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ jobs:
3939
name: Test Node ${{ matrix.node-version }} with --bundle=${{ matrix.bundle }}
4040

4141
steps:
42-
- uses: actions/checkout@v3
42+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4343
- name: Use node version ${{ matrix.node-version }}
44-
uses: actions/setup-node@v3
44+
uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
4545
with:
4646
node-version: ${{ matrix.node-version }}
4747
check-latest: true
@@ -55,8 +55,8 @@ jobs:
5555
runs-on: ubuntu-latest
5656

5757
steps:
58-
- uses: actions/checkout@v3
59-
- uses: actions/setup-node@v3
58+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
59+
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
6060
with:
6161
node-version: '*'
6262
check-latest: true
@@ -69,14 +69,14 @@ jobs:
6969
runs-on: ubuntu-latest
7070

7171
steps:
72-
- uses: actions/checkout@v3
73-
- uses: actions/setup-node@v3
72+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
73+
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
7474
with:
7575
node-version: '*'
7676
check-latest: true
7777
- run: npm ci
7878

79-
- uses: actions/cache@v3
79+
- uses: actions/cache@e12d46a63a90f2fae62d114769bbf2a179198b5c # v3.3.3
8080
with:
8181
path: ~/.cache/dprint
8282
key: ${{ runner.os }}-dprint-${{ hashFiles('package-lock.json', '.dprint.jsonc') }}
@@ -90,8 +90,8 @@ jobs:
9090
runs-on: ubuntu-latest
9191

9292
steps:
93-
- uses: actions/checkout@v3
94-
- uses: actions/setup-node@v3
93+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
94+
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
9595
with:
9696
node-version: '*'
9797
check-latest: true
@@ -107,8 +107,8 @@ jobs:
107107
runs-on: ubuntu-latest
108108

109109
steps:
110-
- uses: actions/checkout@v3
111-
- uses: actions/setup-node@v3
110+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
111+
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
112112
with:
113113
node-version: '*'
114114
check-latest: true
@@ -121,9 +121,9 @@ jobs:
121121
runs-on: ubuntu-latest
122122

123123
steps:
124-
- uses: actions/checkout@v3
124+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
125125

126-
- uses: actions/setup-node@v3
126+
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
127127
with:
128128
node-version: '*'
129129
check-latest: true
@@ -162,16 +162,16 @@ jobs:
162162
if: github.event_name == 'pull_request'
163163

164164
steps:
165-
- uses: actions/checkout@v3
165+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
166166
with:
167167
path: pr
168168

169-
- uses: actions/checkout@v3
169+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
170170
with:
171171
path: base
172172
ref: ${{ github.base_ref }}
173173

174-
- uses: actions/setup-node@v3
174+
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
175175
with:
176176
node-version: '*'
177177
check-latest: true
@@ -204,8 +204,8 @@ jobs:
204204
runs-on: ubuntu-latest
205205

206206
steps:
207-
- uses: actions/checkout@v3
208-
- uses: actions/setup-node@v3
207+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
208+
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
209209
with:
210210
node-version: '*'
211211
check-latest: true
@@ -221,8 +221,8 @@ jobs:
221221
runs-on: ubuntu-latest
222222

223223
steps:
224-
- uses: actions/checkout@v3
225-
- uses: actions/setup-node@v3
224+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
225+
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
226226
with:
227227
node-version: '*'
228228
check-latest: true
@@ -241,8 +241,8 @@ jobs:
241241
runs-on: ubuntu-latest
242242

243243
steps:
244-
- uses: actions/checkout@v3
245-
- uses: actions/setup-node@v3
244+
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
245+
- uses: actions/setup-node@b39b52d1213e96004bfcb1c61a8a6fa8ab84f3e8 # v4.0.1
246246
with:
247247
node-version: '*'
248248
check-latest: true

0 commit comments

Comments
 (0)