Skip to content

Commit b93799f

Browse files
committed
Improve non-ambient class and function merge error
2 parents 9a10ae9 + 663b19f commit b93799f

File tree

14,745 files changed

+1755146
-708277
lines changed

Some content is hidden

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

14,745 files changed

+1755146
-708277
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+
}

.dockerignore

+2-2
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ scripts/processDiagnosticMessages.js
2929
scripts/produceLKG.js
3030
scripts/importDefinitelyTypedTests/importDefinitelyTypedTests.js
3131
scripts/generateLocalizedDiagnosticMessages.js
32+
scripts/configureLanguageServiceBuild.js
3233
scripts/*.js.map
3334
scripts/typings/
3435
coverage/
@@ -42,7 +43,6 @@ yarn-error.log
4243
.parallelperf.*
4344
.failed-tests
4445
TEST-results.xml
45-
package-lock.json
4646
tests
4747
.vscode
48-
.git
48+
.git

.eslintignore

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
/built/local/**
22
/tests/**
33
/lib/**
4-
/src/lib/*.generated.d.ts
4+
/src/lib/*.generated.d.ts

.eslintrc.json

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

20-
"camelcase": "off",
21-
"@typescript-eslint/camelcase": ["error", { "properties": "never", "allow": ["^[A-Za-z][a-zA-Za-z]+_[A-Za-z]+$"] }],
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+
],
2235

23-
"@typescript-eslint/class-name-casing": "error",
2436
"@typescript-eslint/consistent-type-definitions": ["error", "interface"],
25-
"@typescript-eslint/interface-name-prefix": "error",
37+
"@typescript-eslint/consistent-type-assertions": ["error", { "assertionStyle": "as" }],
38+
39+
"no-duplicate-imports": "off",
40+
"@typescript-eslint/no-duplicate-imports": "error",
41+
2642
"@typescript-eslint/no-inferrable-types": "error",
2743
"@typescript-eslint/no-misused-new": "error",
2844
"@typescript-eslint/no-this-alias": "error",
45+
46+
"no-unused-expressions": "off",
47+
"@typescript-eslint/no-unused-expressions": ["error", { "allowTernary": true }],
48+
2949
"@typescript-eslint/prefer-for-of": "error",
3050
"@typescript-eslint/prefer-function-type": "error",
3151
"@typescript-eslint/prefer-namespace-keyword": "error",
@@ -36,6 +56,13 @@
3656
"semi": "off",
3757
"@typescript-eslint/semi": "error",
3858

59+
"space-before-function-paren": "off",
60+
"@typescript-eslint/space-before-function-paren": ["error", {
61+
"asyncArrow": "always",
62+
"anonymous": "always",
63+
"named": "never"
64+
}],
65+
3966
"@typescript-eslint/triple-slash-reference": "error",
4067
"@typescript-eslint/type-annotation-spacing": "error",
4168
"@typescript-eslint/unified-signatures": "error",
@@ -54,6 +81,7 @@
5481
"simple-indent": "error",
5582
"debug-assert": "error",
5683
"no-keywords": "error",
84+
"one-namespace-per-file": "error",
5785

5886
// eslint-plugin-import
5987
"import/no-extraneous-dependencies": ["error", { "optionalDependencies": false }],
@@ -65,7 +93,6 @@
6593
"jsdoc/check-alignment": "error",
6694

6795
// eslint
68-
"brace-style": ["error", "stroustrup", { "allowSingleLine": true }],
6996
"constructor-super": "error",
7097
"curly": ["error", "multi-line"],
7198
"dot-notation": "error",
@@ -74,7 +101,6 @@
74101
"new-parens": "error",
75102
"no-caller": "error",
76103
"no-duplicate-case": "error",
77-
"no-duplicate-imports": "error",
78104
"no-empty": "error",
79105
"no-eval": "error",
80106
"no-extra-bind": "error",
@@ -96,7 +122,6 @@
96122
"no-trailing-spaces": "error",
97123
"no-undef-init": "error",
98124
"no-unsafe-finally": "error",
99-
"no-unused-expressions": ["error", { "allowTernary": true }],
100125
"no-unused-labels": "error",
101126
"no-var": "error",
102127
"object-shorthand": "error",

.github/ISSUE_TEMPLATE/Bug_report.md

+73-37
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,73 @@
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+
# Bug Report
9+
10+
<!--
11+
Please fill in each section completely. Thank you!
12+
-->
13+
14+
### 🔎 Search Terms
15+
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.
19+
-->
20+
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.
29+
For npm: `typescript@next`
30+
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:
35+
-->
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
42+
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)
52+
53+
### 💻 Code
54+
55+
<!-- Please post the relevant code sample here as well-->
56+
```ts
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.
65+
```
66+
67+
### 🙁 Actual behavior
68+
69+
<!-- What happened, and why it was wrong -->
70+
71+
### 🙂 Expected behavior
72+
73+
<!-- What you expected to happen instead, and why -->
+59-45
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,59 @@
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.
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, especially the "Common Feature Requests" section: https://github.com/Microsoft/TypeScript/wiki/FAQ
14-
15-
-->
16-
17-
## Search Terms
18-
19-
<!-- List of keywords you searched for before creating this issue. Write them down here so that others can find this suggestion more easily -->
20-
21-
## Suggestion
22-
23-
<!-- A summary of what you'd like to see added or changed -->
24-
25-
## Use Cases
26-
27-
<!--
28-
What do you want to use this for?
29-
What shortcomings exist with current approaches?
30-
-->
31-
32-
## Examples
33-
34-
<!-- Show how this would be used and what the behavior would be -->
35-
36-
## Checklist
37-
38-
My suggestion meets these guidelines:
39-
40-
* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
41-
* [ ] This wouldn't change the runtime behavior of existing JavaScript code
42-
* [ ] This could be implemented without emitting different JS based on the types of the expressions
43-
* [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, etc.)
44-
* [ ] This feature would agree with the rest of [TypeScript's Design Goals](https://github.com/Microsoft/TypeScript/wiki/TypeScript-Design-Goals).
45-
1+
---
2+
name: Feature Request
3+
about: Suggest an idea
4+
title: ''
5+
labels: ''
6+
assignees: ''
7+
---
8+
# Suggestion
9+
10+
<!--
11+
Please fill in each section completely. Thank you!
12+
-->
13+
14+
## 🔍 Search Terms
15+
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
20+
21+
Replace the text below:
22+
-->
23+
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.
25+
26+
## ✅ Viability Checklist
27+
28+
<!--
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.
32+
-->
33+
My suggestion meets these guidelines:
34+
35+
* [ ] This wouldn't be a breaking change in existing TypeScript/JavaScript code
36+
* [ ] This wouldn't change the runtime behavior of existing JavaScript code
37+
* [ ] This could be implemented without emitting different JS based on the types of the expressions
38+
* [ ] This isn't a runtime feature (e.g. library functionality, non-ECMAScript syntax with JavaScript output, new syntax sugar for JS, etc.)
39+
* [ ] 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/Question.md

-15
This file was deleted.

.github/ISSUE_TEMPLATE/config.yml

+19
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)