Skip to content

Commit 2c3932c

Browse files
committed
Merge branch 'master' into fix-Object.assign-first-param-constraint
2 parents b1350dd + a56baa7 commit 2c3932c

File tree

5,476 files changed

+709522
-317273
lines changed

Some content is hidden

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

5,476 files changed

+709522
-317273
lines changed

.devcontainer/Dockerfile

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# See here for image contents: https://github.com/microsoft/vscode-dev-containers/tree/v0.154.0/containers/javascript-node/.devcontainer/base.Dockerfile
2+
3+
# [Choice] Node.js version: 14, 12, 10
4+
ARG VARIANT="14-buster"
5+
FROM mcr.microsoft.com/vscode/devcontainers/javascript-node:0-${VARIANT}
6+
7+
RUN sudo -u node npm install -g gulp-cli

.devcontainer/devcontainer.json

+16
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"name": "Node.js",
3+
"build": {
4+
"dockerfile": "Dockerfile",
5+
"args": {
6+
"VARIANT": "14"
7+
}
8+
},
9+
"settings": {
10+
"terminal.integrated.shell.linux": "/bin/bash"
11+
},
12+
"extensions": [
13+
"dbaeumer.vscode-eslint"
14+
],
15+
"remoteUser": "node"
16+
}

.eslintrc.json

+7-3
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,9 @@
1717
"@typescript-eslint/adjacent-overload-signatures": "error",
1818
"@typescript-eslint/array-type": "error",
1919

20-
"camelcase": "off",
20+
"brace-style": "off",
21+
"@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
22+
2123
"@typescript-eslint/naming-convention": [
2224
"error",
2325
{ "selector": "typeLike", "format": ["PascalCase"], "filter": { "regex": "^(__String|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
@@ -32,6 +34,10 @@
3234
],
3335

3436
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
37+
38+
"no-duplicate-imports": "off",
39+
"@typescript-eslint/no-duplicate-imports": "error",
40+
3541
"@typescript-eslint/no-inferrable-types": "error",
3642
"@typescript-eslint/no-misused-new": "error",
3743
"@typescript-eslint/no-this-alias": "error",
@@ -86,7 +92,6 @@
8692
"jsdoc/check-alignment": "error",
8793

8894
// eslint
89-
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
9095
"constructor-super": "error",
9196
"curly": ["error", "multi-line"],
9297
"dot-notation": "error",
@@ -95,7 +100,6 @@
95100
"new-parens": "error",
96101
"no-caller": "error",
97102
"no-duplicate-case": "error",
98-
"no-duplicate-imports": "error",
99103
"no-empty": "error",
100104
"no-eval": "error",
101105
"no-extra-bind": "error",

.github/ISSUE_TEMPLATE/Bug_report.md

+49-20
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,70 @@ about: Create a report to help us improve TypeScript
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
8+
# Bug Report
99

10-
<!-- 🚨 STOP 🚨 STOP 🚨 STOP 🚨
11-
12-
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Even if you think you've found a *bug*, please read the FAQ first, especially the Common "Bugs" That Aren't Bugs section!
10+
<!--
11+
Please fill in each section completely. Thank you!
12+
-->
1313

14-
Please help us by doing the following steps before logging an issue:
15-
* Search: https://github.com/Microsoft/TypeScript/search?type=Issues
16-
* Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ
14+
### 🔎 Search Terms
1715

18-
Please fill in the *entire* template below.
16+
<!--
17+
What search terms did you use when trying to find an existing bug report?
18+
List them here so people in the future can find this one more easily.
1919
-->
2020

21-
<!--
22-
Please try to reproduce the issue with the latest published version. It may have already been fixed.
21+
### 🕗 Version & Regression Information
22+
23+
<!-- When did you start seeing this bug occur?
24+
25+
"Bugs" that have existed in TS for a long time are very likely to be FAQs; refer to
26+
https://github.com/Microsoft/TypeScript/wiki/FAQ#common-bugs-that-arent-bugs
27+
28+
If possible, please try testing the nightly version of TS to see if it's already been fixed.
2329
For npm: `typescript@next`
2430
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
31+
32+
Note: The TypeScript Playground can be used to try older versions of TypeScript.
33+
34+
Please keep and fill in the line that best applies:
2535
-->
26-
**TypeScript Version:** 3.7.x-dev.201xxxxx
36+
- This is a crash
37+
- This changed between versions ______ and _______
38+
- This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
39+
- I was unable to test this on prior versions because _______
40+
41+
### ⏯ Playground Link
2742

28-
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
29-
**Search Terms:**
43+
<!--
44+
A link to a TypeScript Playground "Share" link which shows this behavior
45+
46+
The TypeScript Workbench can be used for more complex setups, try
47+
https://www.typescriptlang.org/dev/bug-workbench/
48+
49+
As a last resort, you can link to a repo, but these will be slower for us to investigate.
50+
-->
51+
[Playground link with relevant code](https://www.typescriptlang.org/play?#code/PTAEFkE9QYwewCYFNQHM5IM6gBZIE5JA)
3052

31-
**Code**
53+
### 💻 Code
3254

55+
<!-- Please post the relevant code sample here as well-->
3356
```ts
34-
// A *self-contained* demonstration of the problem follows...
35-
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
57+
// We can quickly address your report if:
58+
// - The code sample is short. Nearly all TypeScript bugs can be demonstrated in 20-30 lines of code!
59+
// - It doesn't use external libraries. These are often issues with the type definitions rather than TypeScript bugs.
60+
// - The incorrectness of the behavior is readily apparent from reading the sample.
61+
// Reports are slower to investigate if:
62+
// - We have to pare too much extraneous code.
63+
// - We have to clone a large repo and validate that the problem isn't elsewhere.
64+
// - The sample is confusing or doesn't clearly demonstrate what's wrong.
3665
```
3766

38-
**Expected behavior:**
67+
### 🙁 Actual behavior
3968

40-
**Actual behavior:**
69+
<!-- What happened, and why it was wrong -->
4170

42-
**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
71+
### 🙂 Expected behavior
4372

44-
**Related Issues:** <!-- Did you find other bugs that looked similar? -->
73+
<!-- What you expected to happen instead, and why -->

.github/ISSUE_TEMPLATE/Feature_request.md

+36-24
Original file line numberDiff line numberDiff line change
@@ -4,44 +4,56 @@ about: Suggest an idea
44
title: ''
55
labels: ''
66
assignees: ''
7-
87
---
8+
# Suggestion
99

10-
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨
11-
12-
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker.
13-
14-
Please help us by doing the following steps before logging an issue:
15-
* Search: https://github.com/Microsoft/TypeScript/search?type=Issues
16-
* Read the FAQ, especially the "Common Feature Requests" section: https://github.com/Microsoft/TypeScript/wiki/FAQ
17-
10+
<!--
11+
Please fill in each section completely. Thank you!
1812
-->
1913

20-
## Search Terms
14+
## 🔍 Search Terms
2115

22-
<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->
16+
<!--
17+
💡 Did you know? TypeScript has over 2,000 open suggestions!
18+
🔎 Please search thoroughly before logging new feature requests as most common ideas already have a proposal in progress.
19+
The "Common Feature Requests" section of the FAQ lists many popular requests: https://github.com/Microsoft/TypeScript/wiki/FAQ#common-feature-requests
2320
24-
## Suggestion
21+
Replace the text below:
22+
-->
2523

26-
<!-- A summary of what you'd like to see added or changed -->
24+
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.
2725

28-
## Use Cases
26+
## ✅ Viability Checklist
2927

3028
<!--
31-
What do you want to use this for?
32-
What shortcomings exist with current approaches?
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.
3332
-->
34-
35-
## Examples
36-
37-
<!-- Show how this would be used and what the behavior would be -->
38-
39-
## Checklist
40-
4133
My suggestion meets these guidelines:
4234

4335
* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
4436
* [ ] This wouldn't change the runtime behavior of existing JavaScript code
4537
* [ ] This could be implemented without emitting different JS based on the types of the expressions
46-
* [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
38+
* [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
4739
* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
40+
41+
42+
## ⭐ Suggestion
43+
44+
<!-- A summary of what you'd like to see added or changed -->
45+
46+
## 📃 Motivating Example
47+
48+
<!--
49+
If you were announcing this feature in a blog post, what's a short explanation that shows
50+
a developer why this feature improves the language?
51+
-->
52+
53+
## 💻 Use Cases
54+
55+
<!--
56+
What do you want to use this for?
57+
What shortcomings exist with current approaches?
58+
What workarounds are you using in the meantime?
59+
-->

.github/ISSUE_TEMPLATE/lib_change.md

+55
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
name: Library change
3+
about: Fix or improve issues with built-in type definitions like `lib.dom.d.ts`, `lib.es6.d.ts`, etc.
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
# lib Update Request
9+
10+
<!--
11+
Please fill in each section completely. Thank you!
12+
13+
Are you here for one of these commonly-requested lib changes?
14+
* Object.keys - see https://stackoverflow.com/questions/55012174/
15+
* Array methods - see https://github.com/microsoft/TypeScript/issues/36554
16+
* parseInt, parseFloat, isFinite, isNaN, etc. - see https://github.com/microsoft/TypeScript/issues/4002
17+
18+
The DOM lib is maintained elsewhere and you can skip a step by filing issues/PRs for the DOM at that repo.
19+
See https://github.com/microsoft/TypeScript-DOM-lib-generator
20+
-->
21+
22+
## Configuration Check
23+
24+
<!--
25+
If you're missing common new methods like Array.includes, you may have a misconfigured project.
26+
Try setting `lib: "es2020"` and checking whether the type you want is present.
27+
You can diagnose further by running `tsc` with `--listFilesOnly` or `--showConfig`.
28+
29+
Conversely, if you are seeing built-in methods you expect to *not* see, check your 'lib' setting
30+
or review your dependencies for lib/reference directives that might be polluting
31+
your global scope. This is common when using the 'node' type library. See https://github.com/microsoft/TypeScript/issues/40184
32+
33+
Replace the text below:
34+
-->
35+
My compilation *target* is `ES2015` and my *lib* is `the default`.
36+
37+
## Missing / Incorrect Definition
38+
39+
<!--
40+
What property, method, function, etc is missing or incorrect?
41+
-->
42+
43+
## Sample Code
44+
45+
<!--
46+
What's some code using this that should work, but doesn't?
47+
-->
48+
49+
## Documentation Link
50+
51+
<!--
52+
Link to relevant documentation (e.g. MDN, W3C, ECMAScript Spec) to consult for this property.
53+
Note that lib.dom.d.ts intentionally does not include browser-specific extensions
54+
or early experimental features.
55+
-->

.github/issue_template.md

-45
This file was deleted.

.github/pr_owners.txt

+5
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,8 @@ RyanCavanaugh
66
sheetalkamat
77
orta
88
rbuckton
9+
ahejlsberg
10+
amcasey
11+
jessetrinity
12+
minestarks
13+
uniqueiniquity
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: Accept Baselines and Fix Lints
2+
3+
on:
4+
workflow_dispatch: {}
5+
6+
jobs:
7+
build:
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Use node version 12
13+
uses: actions/setup-node@v1
14+
with:
15+
node-version: 12
16+
registry-url: https://registry.npmjs.org/
17+
18+
- name: Configure Git, Run Tests, Update Baselines, Apply Fixes
19+
run: |
20+
git config user.email "[email protected]"
21+
git config user.name "TypeScript Bot"
22+
npm install
23+
gulp runtests-parallel --ci --fix || true
24+
gulp baseline-accept
25+
git add ./src
26+
git add ./tests/baselines/reference
27+
git diff --cached
28+
git commit -m "Update Baselines and/or Applied Lint Fixes"
29+
git push

.github/workflows/new-release-branch.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' src/compiler/corePublic.ts
2323
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts
2424
sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts
25-
sed -i -e 's/const version = `${versionMajorMinor}.0-.*`/const version = `${versionMajorMinor}.0-${{ github.event.client_payload.core_tag || 'dev' }}`/g' src/compiler/corePublic.ts
25+
sed -i -e 's/const version\(: string\)\{0,1\} = `${versionMajorMinor}.0-.*`/const version = `${versionMajorMinor}.0-${{ github.event.client_payload.core_tag || 'dev' }}`/g' src/compiler/corePublic.ts
2626
npm ci
2727
gulp LKG
2828
npm test

.github/workflows/nightly.yaml

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ jobs:
2222
- name: Setup and publish nightly
2323
run: |
2424
npm whoami
25-
npm i
25+
npm ci
2626
gulp configure-nightly
2727
gulp LKG
2828
gulp runtests-parallel

0 commit comments

Comments
 (0)