Skip to content

Commit 96bb1af

Browse files
committed
Merge branch 'master' into mappedtype-inference-seperate-symbols
2 parents 13e614a + 6c6315d commit 96bb1af

File tree

15,039 files changed

+1692780
-649064
lines changed

Some content is hidden

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

15,039 files changed

+1692780
-649064
lines changed

.dockerignore

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
node_modules
2+
.node_modules
3+
built/*
4+
test-args.txt
5+
~*.docx
6+
\#*\#
7+
.\#*
8+
src/harness/*.js
9+
src/compiler/diagnosticInformationMap.generated.ts
10+
src/compiler/diagnosticMessages.generated.json
11+
src/parser/diagnosticInformationMap.generated.ts
12+
src/parser/diagnosticMessages.generated.json
13+
rwc-report.html
14+
*.swp
15+
build.json
16+
*.actual
17+
*.config
18+
scripts/debug.bat
19+
scripts/run.bat
20+
scripts/word2md.js
21+
scripts/buildProtocol.js
22+
scripts/ior.js
23+
scripts/authors.js
24+
scripts/configurePrerelease.js
25+
scripts/open-user-pr.js
26+
scripts/open-cherry-pick-pr.js
27+
scripts/processDiagnosticMessages.d.ts
28+
scripts/processDiagnosticMessages.js
29+
scripts/produceLKG.js
30+
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
31+
scripts/generateLocalizedDiagnosticMessages.js
32+
scripts/configureLanguageServiceBuild.js
33+
scripts/*.js.map
34+
scripts/typings/
35+
coverage/
36+
internal/
37+
**/.DS_Store
38+
.settings
39+
**/.vs
40+
.idea
41+
yarn.lock
42+
yarn-error.log
43+
.parallelperf.*
44+
.failed-tests
45+
TEST-results.xml
46+
tests
47+
.vscode
48+
.git

.eslintignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/built/local/**
2+
/tests/**
3+
/lib/**
4+
/src/lib/*.generated.d.ts

.eslintrc.json

Lines changed: 134 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,134 @@
1+
{
2+
"parser": "@typescript-eslint/parser",
3+
"parserOptions": {
4+
"warnOnUnsupportedTypeScriptVersion": false,
5+
"ecmaVersion": 6,
6+
"sourceType": "module"
7+
},
8+
"env": {
9+
"browser": false,
10+
"node": true,
11+
"es6": true
12+
},
13+
"plugins": [
14+
"@typescript-eslint", "jsdoc", "no-null", "import"
15+
],
16+
"rules": {
17+
"@typescript-eslint/adjacent-overload-signatures": "error",
18+
"@typescript-eslint/array-type": "error",
19+
20+
"brace-style": "off",
21+
"@typescript-eslint/brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
22+
23+
"@typescript-eslint/naming-convention": [
24+
"error",
25+
{ "selector": "typeLike", "format": ["PascalCase"], "filter": { "regex": "^(__String|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
26+
{ "selector": "interface", "format": ["PascalCase"], "custom": { "regex": "^I[A-Z]", "match": false }, "filter": { "regex": "^I(Arguments|TextWriter|O([A-Z][a-z]+[A-Za-z]*)?)$", "match": false } },
27+
{ "selector": "variable", "format": ["camelCase", "PascalCase", "UPPER_CASE"], "leadingUnderscore": "allow", "filter": { "regex": "^(_{1,2}filename|_{1,2}dirname|_+|[A-Za-z]+_[A-Za-z]+)$", "match": false } },
28+
{ "selector": "function", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
29+
{ "selector": "parameter", "format": ["camelCase"], "leadingUnderscore": "allow", "filter": { "regex": "^(_+|[A-Za-z]+_[A-Z][a-z]+)$", "match": false } },
30+
{ "selector": "method", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
31+
{ "selector": "memberLike", "format": ["camelCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
32+
{ "selector": "enumMember", "format": ["camelCase", "PascalCase"], "leadingUnderscore": "allow", "filter": { "regex": "^[A-Za-z]+_[A-Za-z]+$", "match": false } },
33+
{ "selector": "property", "format": null }
34+
],
35+
36+
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
37+
38+
"no-duplicate-imports": "off",
39+
"@typescript-eslint/no-duplicate-imports": "error",
40+
41+
"@typescript-eslint/no-inferrable-types": "error",
42+
"@typescript-eslint/no-misused-new": "error",
43+
"@typescript-eslint/no-this-alias": "error",
44+
45+
"no-unused-expressions": "off",
46+
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
47+
48+
"@typescript-eslint/prefer-for-of": "error",
49+
"@typescript-eslint/prefer-function-type": "error",
50+
"@typescript-eslint/prefer-namespace-keyword": "error",
51+
52+
"quotes": "off",
53+
"@typescript-eslint/quotes": ["error", "double", { "avoidEscape": true, "allowTemplateLiterals": true }],
54+
55+
"semi": "off",
56+
"@typescript-eslint/semi": "error",
57+
58+
"space-before-function-paren": "off",
59+
"@typescript-eslint/space-before-function-paren": ["error", {
60+
"asyncArrow": "always",
61+
"anonymous": "always",
62+
"named": "never"
63+
}],
64+
65+
"@typescript-eslint/triple-slash-reference": "error",
66+
"@typescript-eslint/type-annotation-spacing": "error",
67+
"@typescript-eslint/unified-signatures": "error",
68+
69+
// scripts/eslint/rules
70+
"object-literal-surrounding-space": "error",
71+
"no-type-assertion-whitespace": "error",
72+
"type-operator-spacing": "error",
73+
"only-arrow-functions": ["error", {
74+
"allowNamedFunctions": true ,
75+
"allowDeclarations": true
76+
}],
77+
"no-double-space": "error",
78+
"boolean-trivia": "error",
79+
"no-in-operator": "error",
80+
"simple-indent": "error",
81+
"debug-assert": "error",
82+
"no-keywords": "error",
83+
"one-namespace-per-file": "error",
84+
85+
// eslint-plugin-import
86+
"import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }],
87+
88+
// eslint-plugin-no-null
89+
"no-null/no-null": "error",
90+
91+
// eslint-plugin-jsdoc
92+
"jsdoc/check-alignment": "error",
93+
94+
// eslint
95+
"constructor-super": "error",
96+
"curly": ["error", "multi-line"],
97+
"dot-notation": "error",
98+
"eqeqeq": "error",
99+
"linebreak-style": ["error", "windows"],
100+
"new-parens": "error",
101+
"no-caller": "error",
102+
"no-duplicate-case": "error",
103+
"no-empty": "error",
104+
"no-eval": "error",
105+
"no-extra-bind": "error",
106+
"no-fallthrough": "error",
107+
"no-new-func": "error",
108+
"no-new-wrappers": "error",
109+
"no-return-await": "error",
110+
"no-restricted-globals": ["error",
111+
{ "name": "setTimeout" },
112+
{ "name": "clearTimeout" },
113+
{ "name": "setInterval" },
114+
{ "name": "clearInterval" },
115+
{ "name": "setImmediate" },
116+
{ "name": "clearImmediate" }
117+
],
118+
"no-sparse-arrays": "error",
119+
"no-template-curly-in-string": "error",
120+
"no-throw-literal": "error",
121+
"no-trailing-spaces": "error",
122+
"no-undef-init": "error",
123+
"no-unsafe-finally": "error",
124+
"no-unused-labels": "error",
125+
"no-var": "error",
126+
"object-shorthand": "error",
127+
"prefer-const": "error",
128+
"prefer-object-spread": "error",
129+
"quote-props": ["error", "consistent-as-needed"],
130+
"space-in-parens": "error",
131+
"unicode-bom": ["error", "never"],
132+
"use-isnan": "error"
133+
}
134+
}

.github/ISSUE_TEMPLATE/Bug_report.md

Lines changed: 44 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,44 @@
1-
---
2-
name: Bug report
3-
about: Create a report to help us improve
4-
5-
---
6-
7-
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨
8-
9-
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 help us by doing the following steps before logging an issue:
12-
* Search: https://github.com/Microsoft/TypeScript/search?type=Issues
13-
* Read the FAQ: https://github.com/Microsoft/TypeScript/wiki/FAQ
14-
15-
Please fill in the *entire* template below.
16-
-->
17-
18-
<!-- Please try to reproduce the issue with `typescript@next`. It may have already been fixed. -->
19-
**TypeScript Version:** 3.4.0-dev.201xxxxx
20-
21-
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
22-
**Search Terms:**
23-
24-
**Code**
25-
26-
```ts
27-
// A *self-contained* demonstration of the problem follows...
28-
// Test this by running `tsc` on the command-line, rather than through another build tool such as Gulp, Webpack, etc.
29-
```
30-
31-
**Expected behavior:**
32-
33-
**Actual behavior:**
34-
35-
**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
36-
37-
**Related Issues:** <!-- Did you find other bugs that looked similar? -->
1+
---
2+
name: Bug
3+
about: Create a report to help us improve TypeScript
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
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!
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: https://github.com/Microsoft/TypeScript/wiki/FAQ
17+
18+
Please fill in the *entire* template below.
19+
-->
20+
21+
<!--
22+
Please try to reproduce the issue with the latest published version. It may have already been fixed.
23+
For npm: `typescript@next`
24+
This is also the 'Nightly' version in the playground: http://www.typescriptlang.org/play/?ts=Nightly
25+
-->
26+
**TypeScript Version:** 3.7.x-dev.201xxxxx
27+
28+
<!-- Search terms you tried before logging this (so others can find this issue more easily) -->
29+
**Search Terms:**
30+
31+
**Code**
32+
33+
```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.
36+
```
37+
38+
**Expected behavior:**
39+
40+
**Actual behavior:**
41+
42+
**Playground Link:** <!-- A link to a TypeScript Playground "Share" link which demonstrates this behavior -->
43+
44+
**Related Issues:** <!-- Did you find other bugs that looked similar? -->
Lines changed: 47 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,47 @@
1-
---
2-
name: Feature request
3-
about: Suggest an idea for this project
4-
5-
---
6-
7-
<!-- 🚨 STOP 🚨 𝗦𝗧𝗢𝗣 🚨 𝑺𝑻𝑶𝑷 🚨
8-
9-
Half of all issues filed here are duplicates, answered in the FAQ, or not appropriate for the bug tracker. Please read the FAQ first, especially the "Common Feature Requests" section.
10-
11-
-->
12-
13-
## Search Terms
14-
15-
<!-- 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-
## Suggestion
18-
19-
<!-- A summary of what you'd like to see added or changed -->
20-
21-
## Use Cases
22-
23-
<!--
24-
What do you want to use this for?
25-
What shortcomings exist with current approaches?
26-
-->
27-
28-
## Examples
29-
30-
<!-- Show how this would be used and what the behavior would be -->
31-
32-
## Checklist
33-
34-
My suggestion meets these guidelines:
35-
36-
* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
37-
* [ ] This wouldn't change the runtime behavior of existing JavaScript code
38-
* [ ] This could be implemented without emitting different JS based on the types of the expressions
39-
* [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
40-
* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
41-
1+
---
2+
name: Feature Request
3+
about: Suggest an idea
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
8+
---
9+
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+
18+
-->
19+
20+
## Search Terms
21+
22+
<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->
23+
24+
## Suggestion
25+
26+
<!-- A summary of what you'd like to see added or changed -->
27+
28+
## Use Cases
29+
30+
<!--
31+
What do you want to use this for?
32+
What shortcomings exist with current approaches?
33+
-->
34+
35+
## Examples
36+
37+
<!-- Show how this would be used and what the behavior would be -->
38+
39+
## Checklist
40+
41+
My suggestion meets these guidelines:
42+
43+
* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
44+
* [ ] This wouldn't change the runtime behavior of existing JavaScript code
45+
* [ ] 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.)
47+
* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).

.github/ISSUE_TEMPLATE/Question.md

Lines changed: 0 additions & 15 deletions
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

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

0 commit comments

Comments
 (0)