Skip to content

Commit 731ba91

Browse files
committed
Merge branch 'main' into typeof-coud-narrow-union-type
2 parents bfa6a92 + db2573c commit 731ba91

File tree

328 files changed

+76026
-26265
lines changed

Some content is hidden

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

328 files changed

+76026
-26265
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
{
2+
"project": "../../src/tsconfig.json",
3+
"source": "../../package.json",
4+
"package": "../../package.json",
5+
"out": "../../typescript.lsif"
6+
}

.github/workflows/rich-navigation.yml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
name: "Rich Navigation Indexing"
2+
on:
3+
workflow_dispatch:
4+
push:
5+
branches:
6+
- main
7+
- release-*
8+
pull_request:
9+
branches:
10+
- main
11+
- release-*
12+
13+
jobs:
14+
richnav:
15+
runs-on: windows-latest
16+
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 5
21+
22+
- uses: actions/setup-node@v2
23+
with:
24+
node-version: 14
25+
26+
- name: Install dependencies
27+
run: npm ci
28+
29+
- uses: microsoft/[email protected]
30+
with:
31+
languages: typescript
32+
repo-token: ${{ secrets.GITHUB_TOKEN }}
33+
typescriptVersion: 0.6.0-next.18
34+
configFiles: .github/workflow-resources/.lsifrc.json
35+
continue-on-error: true

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ In general, things we find useful when reviewing suggestions are:
7272

7373
### Using a development container
7474

75-
This repository includes a [development container](https://code.visualstudio.com/docs/remote/containers) that you can use to quickly create an isolated development environment with all the tools you need to start working on TypeScript. To get started with a dev container and VS Code, either:
75+
If you prefer to develop using containers, this repository includes a [development container](https://code.visualstudio.com/docs/remote/containers) that you can use to quickly create an isolated development environment with all the tools you need to start working on TypeScript. To get started with a dev container and VS Code, either:
7676

7777
- Clone the TypeScript repository locally and use the `Open Folder in Container` command.
7878
- Use the `Clone Repository in Container Volume` command to clone the TypeScript repository into a new container.

Gulpfile.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -437,10 +437,6 @@ task("watch-local").flags = {
437437
" --built": "Compile using the built version of the compiler."
438438
};
439439

440-
const generateCodeCoverage = () => exec("istanbul", ["cover", "node_modules/mocha/bin/_mocha", "--", "-R", "min", "-t", "" + cmdLineOptions.testTimeout, "built/local/run.js"]);
441-
task("generate-code-coverage", series(preBuild, buildTests, generateCodeCoverage));
442-
task("generate-code-coverage").description = "Generates code coverage data via istanbul";
443-
444440
const preTest = parallel(buildTsc, buildTests, buildServices, buildLssl);
445441
preTest.displayName = "preTest";
446442

lib/lib.es2021.d.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ and limitations under the License.
2222
/// <reference lib="es2021.promise" />
2323
/// <reference lib="es2021.string" />
2424
/// <reference lib="es2021.weakref" />
25+
/// <reference lib="es2021.intl" />

package-lock.json

Lines changed: 238 additions & 625 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"@types/chai": "latest",
3535
"@types/convert-source-map": "latest",
3636
"@types/glob": "latest",
37-
"@types/gulp": "^4.0.5",
37+
"@types/gulp": "^4.0.9",
3838
"@types/gulp-concat": "latest",
3939
"@types/gulp-newer": "latest",
4040
"@types/gulp-rename": "0.0.33",
@@ -57,7 +57,7 @@
5757
"@typescript-eslint/experimental-utils": "^4.28.0",
5858
"@typescript-eslint/parser": "^4.28.0",
5959
"async": "latest",
60-
"azure-devops-node-api": "^10.1.0",
60+
"azure-devops-node-api": "^11.0.1",
6161
"browser-resolve": "^1.11.2",
6262
"browserify": "latest",
6363
"chai": "latest",
@@ -79,19 +79,17 @@
7979
"gulp-newer": "latest",
8080
"gulp-rename": "latest",
8181
"gulp-sourcemaps": "latest",
82-
"istanbul": "latest",
8382
"merge2": "latest",
8483
"minimist": "latest",
8584
"mkdirp": "latest",
8685
"mocha": "latest",
8786
"mocha-fivemat-progress-reporter": "latest",
8887
"ms": "latest",
89-
"node-fetch": "^2.6.0",
88+
"node-fetch": "^2.6.1",
9089
"plugin-error": "latest",
9190
"pretty-hrtime": "^1.0.3",
9291
"prex": "^0.4.3",
9392
"q": "latest",
94-
"remove-internal": "^2.9.2",
9593
"source-map-support": "latest",
9694
"through2": "latest",
9795
"typescript": "^4.2.3",
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
// @ts-check
2+
// This file requires a modern version of node 14+, and grep to be available.
3+
4+
// node scripts/find-unused-diagnostic-messages.mjs
5+
import { readFileSync } from "fs";
6+
import {EOL} from "os";
7+
import { execSync } from "child_process";
8+
9+
const diags = readFileSync("src/compiler/diagnosticInformationMap.generated.ts", "utf8");
10+
const startOfDiags = diags.split("export const Diagnostics")[1];
11+
12+
const missingNames = [];
13+
startOfDiags.split(EOL).forEach(line => {
14+
if (!line.includes(":")) return;
15+
const diagName = line.split(":")[0].trim();
16+
17+
try {
18+
execSync(`grep -rnw 'src' -e 'Diagnostics.${diagName}'`).toString();
19+
process.stdout.write(".");
20+
} catch (error) {
21+
missingNames.push(diagName);
22+
process.stdout.write("x");
23+
}
24+
});
25+
26+
if (missingNames.length) {
27+
process.exitCode = 1;
28+
console.log("Could not find usage of these diagnostics in the codebase:");
29+
console.log(missingNames);
30+
}

src/compiler/binder.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3388,7 +3388,7 @@ namespace ts {
33883388

33893389
function bindTypeParameter(node: TypeParameterDeclaration) {
33903390
if (isJSDocTemplateTag(node.parent)) {
3391-
const container = find((node.parent.parent as JSDoc).tags!, isJSDocTypeAlias) || getHostSignatureFromJSDoc(node.parent); // TODO: GH#18217
3391+
const container = getEffectiveContainerForJSDocTemplateTag(node.parent);
33923392
if (container) {
33933393
if (!container.locals) {
33943394
container.locals = createSymbolTable();

0 commit comments

Comments
 (0)