diff --git a/.dockerignore b/.dockerignore index cc908c0036a..f173f5a6a51 100644 --- a/.dockerignore +++ b/.dockerignore @@ -43,7 +43,6 @@ yarn-error.log .parallelperf.* .failed-tests TEST-results.xml -package-lock.json tests .vscode .git diff --git a/.github/codeql/codeql-configuration.yml b/.github/codeql/codeql-configuration.yml new file mode 100644 index 00000000000..402799f89de --- /dev/null +++ b/.github/codeql/codeql-configuration.yml @@ -0,0 +1,4 @@ +name : CodeQL Configuration + +paths: + - './src' diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 32e5fa02b36..ae0e4fbdaa9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - node-version: [10.x, 12.x, 13.x] + node-version: [10.x, 12.x, 14.x] steps: - uses: actions/checkout@v2 @@ -30,8 +30,7 @@ jobs: run: | npm uninstall typescript --no-save npm uninstall tslint --no-save - - run: npm install - - run: npm update + - run: npm ci # Re: https://github.com/actions/setup-node/pull/125 - name: Register Problem Matcher for TSC @@ -43,6 +42,9 @@ jobs: - name: Linter run: npm run lint:ci + - name: Adding playwright + run: npm install --no-save --no-package-lock playwright + - name: Validate the browser can import TypeScript run: gulp test-browser-integration - + diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml new file mode 100644 index 00000000000..0eaa4fb4274 --- /dev/null +++ b/.github/workflows/codeql.yml @@ -0,0 +1,54 @@ +name: "Code scanning - action" + +on: + push: + pull_request: + schedule: + - cron: '0 19 * * 0' + +jobs: + CodeQL-Build: + + # CodeQL runs on ubuntu-latest and windows-latest + runs-on: ubuntu-latest + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + with: + # We must fetch at least the immediate parents so that if this is + # a pull request then we can checkout the head. + fetch-depth: 2 + + # If this run was triggered by a pull request event, then checkout + # the head of the pull request instead of the merge commit. + - run: git checkout HEAD^2 + if: ${{ github.event_name == 'pull_request' }} + + # Initializes the CodeQL tools for scanning. + - name: Initialize CodeQL + uses: github/codeql-action/init@v1 + with: + config-file: ./.github/codeql/codeql-configuration.yml + # Override language selection by uncommenting this and choosing your languages + # with: + # languages: go, javascript, csharp, python, cpp, java + + # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). + # If this step fails, then you should remove it and run the build manually (see below) + - name: Autobuild + uses: github/codeql-action/autobuild@v1 + + # â„šī¸ Command-line programs to run using the OS shell. + # 📚 https://git.io/JvXDl + + # âœī¸ If the Autobuild fails above, remove it and uncomment the following three lines + # and modify them (or add more) to build your code if your project + # uses a compiled language + + #- run: | + # make bootstrap + # make release + + - name: Perform CodeQL Analysis + uses: github/codeql-action/analyze@v1 diff --git a/.github/workflows/new-release-branch.yaml b/.github/workflows/new-release-branch.yaml index 1e145a0932f..8cb80522ae2 100644 --- a/.github/workflows/new-release-branch.yaml +++ b/.github/workflows/new-release-branch.yaml @@ -23,7 +23,7 @@ jobs: sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts sed -i -e 's/const version = `${versionMajorMinor}.0-.*`/const version = `${versionMajorMinor}.0-${{ github.event.client_payload.core_tag || 'dev' }}`/g' src/compiler/corePublic.ts - npm install + npm ci gulp LKG npm test git diff @@ -32,7 +32,7 @@ jobs: git add tests/baselines/reference/api/typescript.d.ts git add tests/baselines/reference/api/tsserverlibrary.d.ts git add ./lib - git config user.email "ts_bot@rcavanaugh.com" + git config user.email "typescriptbot@microsoft.com" git config user.name "TypeScript Bot" git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG' git push --set-upstream origin ${{ github.event.client_payload.branch_name }} diff --git a/.github/workflows/release-branch-artifact.yaml b/.github/workflows/release-branch-artifact.yaml index ed50cfeb646..7683b7623ac 100644 --- a/.github/workflows/release-branch-artifact.yaml +++ b/.github/workflows/release-branch-artifact.yaml @@ -21,8 +21,7 @@ jobs: npm uninstall tslint --no-save - name: npm install and test run: | - npm install - npm update + npm ci npm test env: CI: true @@ -41,4 +40,3 @@ jobs: with: name: tgz path: typescript.tgz - \ No newline at end of file diff --git a/.github/workflows/set-version.yaml b/.github/workflows/set-version.yaml index a31d849cb41..f337d5b58f4 100644 --- a/.github/workflows/set-version.yaml +++ b/.github/workflows/set-version.yaml @@ -29,7 +29,7 @@ jobs: sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/typescript.d.ts sed -i -e 's/const versionMajorMinor = ".*"/const versionMajorMinor = "${{ github.event.client_payload.core_major_minor }}"/g' tests/baselines/reference/api/tsserverlibrary.d.ts sed -i -e 's/const version = .*;/const version = "${{ github.event.client_payload.package_version }}" as string;/g' src/compiler/corePublic.ts - npm install + npm ci gulp LKG npm test git diff @@ -38,7 +38,7 @@ jobs: git add tests/baselines/reference/api/typescript.d.ts git add tests/baselines/reference/api/tsserverlibrary.d.ts git add ./lib - git config user.email "ts_bot@rcavanaugh.com" + git config user.email "typescriptbot@microsoft.com" git config user.name "TypeScript Bot" git commit -m 'Bump version to ${{ github.event.client_payload.package_version }} and LKG' git push diff --git a/.github/workflows/sync-branch.yaml b/.github/workflows/sync-branch.yaml index 642a353aa3c..a8dd55b3c70 100644 --- a/.github/workflows/sync-branch.yaml +++ b/.github/workflows/sync-branch.yaml @@ -3,6 +3,11 @@ name: Sync branch with master on: repository_dispatch: types: sync-branch + workflow_dispatch: + inputs: + branch_name: + description: 'Target Branch Name' + required: true jobs: build: @@ -15,15 +20,16 @@ jobs: node-version: 12.x - uses: actions/checkout@v2 with: - ref: ${{ github.event.client_payload.branch_name }} + ref: ${{ github.event.inputs.branch_name || github.event.client_payload.branch_name }} + fetch-depth: 0 # This does a test post-merge and only pushes the result if the test succeeds # required client_payload members: # branch_name - the target branch - run: | - git config user.email "ts_bot@rcavanaugh.com" + git config user.email "typescriptbot@microsoft.com" git config user.name "TypeScript Bot" git fetch origin master - git merge master --no-ff - npm install + git merge origin/master --no-ff + npm ci npm test git push diff --git a/.github/workflows/twoslash-repros.yaml b/.github/workflows/twoslash-repros.yaml new file mode 100644 index 00000000000..f4888f53341 --- /dev/null +++ b/.github/workflows/twoslash-repros.yaml @@ -0,0 +1,23 @@ +name: Twoslash Code Sample Repros + +on: + push: + branches: + - orta-twoslash-repros + schedule: + - cron: '0 8 * * *' + repository_dispatch: + types: run-twoslash-repros + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Use node + uses: actions/setup-node@v1 + - run: | + npm init -y + npm install --save typescript@next + - uses: microsoft/TypeScript-Twoslash-Repro-Action@master + with: + github-token: ${{ secrets.TS_BOT_GITHUB_TOKEN }} diff --git a/.github/workflows/update-lkg.yml b/.github/workflows/update-lkg.yml new file mode 100644 index 00000000000..cf81cc97db9 --- /dev/null +++ b/.github/workflows/update-lkg.yml @@ -0,0 +1,28 @@ +name: Update LKG + +on: + workflow_dispatch: {} + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - name: Use node version 12 + uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + + - name: Configure Git and Update LKG + run: | + git config user.email "typescriptbot@microsoft.com" + git config user.name "TypeScript Bot" + npm ci + gulp LKG + npm test + git diff + git add ./lib + git commit -m "Update LKG" + git push diff --git a/.github/workflows/update-package-lock.yaml b/.github/workflows/update-package-lock.yaml new file mode 100644 index 00000000000..24defcb1f93 --- /dev/null +++ b/.github/workflows/update-package-lock.yaml @@ -0,0 +1,28 @@ +name: Update package-lock.json + +on: + schedule: + # This is probably 6am UTC, which is 10pm PST or 11pm PDT + # Alternatively, 6am local is also fine + - cron: '0 6 * * *' + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v2 + - uses: actions/setup-node@v1 + with: + node-version: 12 + registry-url: https://registry.npmjs.org/ + + - name: Configure git and update package-lock.json + run: | + git config user.email "typescriptbot@microsoft.com" + git config user.name "TypeScript Bot" + npm install --package-lock-only + git add -f package-lock.json + if git commit -m "Update package-lock.json"; then + git push + fi diff --git a/.npmrc b/.npmrc deleted file mode 100644 index 9cf9495031e..00000000000 --- a/.npmrc +++ /dev/null @@ -1 +0,0 @@ -package-lock=false \ No newline at end of file diff --git a/.travis.yml b/.travis.yml index cfb265e189e..0f740d0c43c 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,8 +2,8 @@ language: node_js node_js: - 'node' + - '12' - '10' - - '8' env: - workerCount=3 timeout=600000 @@ -18,7 +18,7 @@ branches: install: - npm uninstall typescript --no-save - - npm install + - npm ci cache: directories: diff --git a/.vscode/launch.template.json b/.vscode/launch.template.json index 07e919ba960..ca3ac8d2b88 100644 --- a/.vscode/launch.template.json +++ b/.vscode/launch.template.json @@ -47,14 +47,24 @@ "console": "integratedTerminal", "outFiles": [ "${workspaceRoot}/built/local/run.js" - ] + ], + + // NOTE: To use this, you must switch the "type" above to "pwa-node". You may also need to follow the instructions + // here: https://github.com/microsoft/vscode-js-debug#nightly-extension to use the js-debug nightly until + // this feature is shipping in insiders or to a release: + // "customDescriptionGenerator": "'__tsDebuggerDisplay' in this ? this.__tsDebuggerDisplay(defaultValue) : defaultValue" }, { // See: https://github.com/microsoft/TypeScript/wiki/Debugging-Language-Service-in-VS-Code "type": "node", "request": "attach", "name": "Attach to VS Code TS Server via Port", - "processId": "${command:PickProcess}" + "processId": "${command:PickProcess}", + + // NOTE: To use this, you must switch the "type" above to "pwa-node". You may also need to follow the instructions + // here: https://github.com/microsoft/vscode-js-debug#nightly-extension to use the js-debug nightly until + // this feature is shipping in insiders or to a release: + // "customDescriptionGenerator": "'__tsDebuggerDisplay' in this ? this.__tsDebuggerDisplay(defaultValue) : defaultValue" } ] } diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 9c7f69b24e2..459b0793f8c 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -47,6 +47,27 @@ In general, things we find useful when reviewing suggestions are: # Instructions for Contributing Code +## What You'll Need + +0. [A bug or feature you want to work on](https://github.com/microsoft/TypeScript/labels/help%20wanted)! +1. [A GitHub account](https://github.com/join). +2. A copy of the TypeScript code. See the next steps for instructions. +3. [Node](https://nodejs.org), which runs JavaScript locally. Current or LTS will both work. +4. An editor. [VS Code](https://code.visualstudio.com) is the best place to start for TypeScript. +5. The gulp command line tool, for building and testing changes. See the next steps for how to install it. + +## Get Started + +1. Install node using the version you downloaded from [nodejs.org](https://nodejs.org). +2. Open a terminal. +3. Make a fork—your own copy—of TypeScript on your GitHub account, then make a clone—a local copy—on your computer. ([Here are some step-by-step instructions](https://github.com/anitab-org/mentorship-android/wiki/Fork%2C-Clone-%26-Remote)). Add `--depth=1` to the end of the `git clone` command to save time. +4. Install the gulp command line tool: `npm install -g gulp-cli` +5. Change to the TypeScript folder you made: `cd TypeScript` +6. Install dependencies: `npm ci` +7. Make sure everything builds and tests pass: `gulp runtests-parallel` +8. Open the Typescript folder in your editor. +9. Follow the directions below to add and debug a test. + ## Tips ### Faster clones @@ -65,8 +86,6 @@ TypeScript is currently accepting contributions in the form of bug fixes. A bug Features (things that add new or improved functionality to TypeScript) may be accepted, but will need to first be approved (labelled ["help wanted"](https://github.com/Microsoft/TypeScript/issues?q=is%3Aopen+is%3Aissue+label%3A%22help+wanted%22) or in the "Backlog" milestone) by a TypeScript project maintainer in the suggestion issue. Features with language design impact, or that are adequately satisfied with external tools, will not be accepted. -Design changes will not be accepted at this time. If you have a design change proposal, please log a suggestion issue. - ## Legal You will need to complete a Contributor License Agreement (CLA). Briefly, this agreement testifies that you are granting us permission to use the submitted change according to the terms of the project's license, and that the work being submitted is under appropriate copyright. Upon submitting a pull request, you will automatically be given instructions on how to sign the CLA. @@ -76,16 +95,11 @@ You will need to complete a Contributor License Agreement (CLA). Briefly, this a Your pull request should: * Include a description of what your change intends to do -* Be a child commit of a reasonably recent commit in the **master** branch - * Requests need not be a single commit, but should be a linear sequence of commits (i.e. no merge commits in your PR) -* It is desirable, but not necessary, for the tests to pass at each commit -* Have clear commit messages - * e.g. "Minor refactor in goToTypeDefinition", "Fix iterated type in for-await-of", "Add test for preserveWatchOutput on command line" +* Be based on reasonably recent commit in the **master** branch * Include adequate tests * At least one test should fail in the absence of your non-test code changes. If your PR does not match this criteria, please specify why * Tests should include reasonable permutations of the target fix/change * Include baseline changes with your change - * All changed code must have 100% code coverage * Follow the code conventions described in [Coding guidelines](https://github.com/Microsoft/TypeScript/wiki/Coding-guidelines) * To avoid line ending issues, set `autocrlf = input` and `whitespace = cr-at-eol` in your git configuration @@ -149,37 +163,35 @@ You can also use the [provided VS Code launch configuration](./.vscode/launch.te ## Adding a Test -To add a new test case, simply place a `.ts` file in `tests\cases\compiler` containing code that exemplifies the bugfix or change you are making. +To add a new test case, add a `.ts` file in `tests\cases\compiler` with code that shows the your bug is now fixed, or your new feature now works. These files support metadata tags in the format `// @metaDataName: value`. The supported names and values are the same as those supported in the compiler itself, with the addition of the `fileName` flag. `fileName` tags delimit sections of a file to be used as separate compilation units. -They are useful for tests relating to modules. +They are useful for testing modules. See below for examples. -**Note** that if you have a test corresponding to a specific spec compliance item, you can place it in `tests\cases\conformance` in an appropriately-named subfolder. -**Note** that filenames here must be distinct from all other compiler testcase names, so you may have to work a bit to find a unique name if it's something common. +**Note** that if you have a test corresponding to a specific area of spec compliance, you can put it in the appropriate subfolder of `tests\cases\conformance`. +**Note** that test filenames must be distinct from all other test names, so you may have to work a bit to find a unique name if it's something common. ### Tests for multiple files -When one needs to test for scenarios which require multiple files, it is useful to use the `fileName` metadata tag as such: +When you need to mimic having multiple files in a single test to test features such as "import", use the `filename` tag: -```TypeScript -// @fileName: file1.ts +```ts +// @filename: file1.ts export function f() { } -// @fileName: file2.ts +// @filename: file2.ts import { f as g } from "file1"; var x = g(); ``` -One can also write a project test, but it is slightly more involved. - ## Managing the Baselines -Compiler testcases generate baselines that track the emitted `.js`, the errors produced by the compiler, and the type of each expression in the file. Additionally, some testcases opt in to baselining the source map output. +Compiler tests generate baselines: one file each for the emitted `.js`, the errors produced by the compiler, the type of each expression, and symbol for each identifier. Additionally, some tests generate baselines for the source map output. When a change in the baselines is detected, the test will fail. To inspect changes vs the expected baselines, use @@ -193,7 +205,8 @@ After verifying that the changes in the baselines are correct, run gulp baseline-accept ``` -to establish the new baselines as the desired behavior. This will change the files in `tests\baselines\reference`, which should be included as part of your commit. It's important to carefully validate changes in the baselines. +This will change the files in `tests\baselines\reference`, which should be included as part of your commit. +Be sure to validate the changes carefully -- apparently unrelated changes to baselines can be clues about something you didn't think of. ## Localization diff --git a/Dockerfile b/Dockerfile index 8898a69af6d..5606df96111 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,6 +2,6 @@ FROM node:current COPY . /typescript WORKDIR /typescript -RUN npm install +RUN npm ci RUN npm i -g gulp-cli RUN gulp configure-insiders && gulp LKG && gulp clean && npm pack . \ No newline at end of file diff --git a/Gulpfile.js b/Gulpfile.js index 7bd32515ba5..82af1630c5c 100644 --- a/Gulpfile.js +++ b/Gulpfile.js @@ -413,7 +413,7 @@ const cleanTypesMap = () => del("built/local/typesMap.json"); cleanTasks.push(cleanTypesMap); // Drop a copy of diagnosticMessages.generated.json into the built/local folder. This allows -// it to be synced to the Azure DevOps repo, so that it can get picked up by the build +// it to be synced to the Azure DevOps repo, so that it can get picked up by the build // pipeline that generates the localization artifacts that are then fed into the translation process. const builtLocalDiagnosticMessagesGeneratedJson = "built/local/diagnosticMessages.generated.json"; const copyBuiltLocalDiagnosticMessages = () => src(diagnosticMessagesGeneratedJson) @@ -591,7 +591,7 @@ task("LKG").flags = { " --built": "Compile using the built version of the compiler.", }; -const generateSpec = () => exec("cscript", ["//nologo", "scripts/word2md.js", path.resolve("doc/TypeScript Language Specification.docx"), path.resolve("doc/spec.md")]); +const generateSpec = () => exec("cscript", ["//nologo", "scripts/word2md.js", path.resolve("doc/TypeScript Language Specification - ARCHIVED.docx"), path.resolve("doc/spec-ARCHIVED.md")]); task("generate-spec", series(buildScripts, generateSpec)); task("generate-spec").description = "Generates a Markdown version of the Language Specification"; diff --git a/README.md b/README.md index 848f1f4dd8c..c3e5c9ccb18 100644 --- a/README.md +++ b/README.md @@ -33,8 +33,8 @@ There are many ways to [contribute](https://github.com/microsoft/TypeScript/blob * Help each other in the [TypeScript Community Discord](https://discord.gg/typescript). * Join the [#typescript](https://twitter.com/search?q=%23TypeScript) discussion on Twitter. * [Contribute bug fixes](https://github.com/microsoft/TypeScript/blob/master/CONTRIBUTING.md). -* Read the language specification ([docx](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.docx?raw=true), - [pdf](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification.pdf?raw=true), [md](https://github.com/microsoft/TypeScript/blob/master/doc/spec.md)). +* Read the archived language specification ([docx](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification%20-%20ARCHIVED.docx?raw=true), + [pdf](https://github.com/microsoft/TypeScript/blob/master/doc/TypeScript%20Language%20Specification%20-%20ARCHIVED.pdf?raw=true), [md](https://github.com/microsoft/TypeScript/blob/master/doc/spec-archived.md)). This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) @@ -44,7 +44,6 @@ with any additional questions or comments. * [TypeScript in 5 minutes](https://www.typescriptlang.org/docs/handbook/typescript-in-5-minutes.html) * [Programming handbook](https://www.typescriptlang.org/docs/handbook/basic-types.html) -* [Language specification](https://github.com/microsoft/TypeScript/blob/master/doc/spec.md) * [Homepage](https://www.typescriptlang.org/) ## Building @@ -67,7 +66,7 @@ Install [Gulp](https://gulpjs.com/) tools and dev dependencies: ```bash npm install -g gulp -npm install +npm ci ``` Use one of the following to build and test: diff --git a/doc/README.md b/doc/README.md index cfc97fedbe9..c81a96f7ca7 100644 --- a/doc/README.md +++ b/doc/README.md @@ -3,7 +3,7 @@ This directory contains miscellaneous documentation such as the TypeScript language specification and logo. If you are looking for more introductory material, you might want to take a look at the [TypeScript Handbook](https://github.com/Microsoft/TypeScript-Handbook). -# Spec Contributions - -The specification is first authored as a Microsoft Word (docx) file and then generated into Markdown and PDF formats. -Due to the binary format of docx files, and the merging difficulties that may come with it, it is preferred that **any suggestions or problems found in the spec should be [filed as issues](https://github.com/Microsoft/TypeScript/issues/new)** rather than sent as pull requests. + +# Archived Spec + +NOTE: the files in this directory are NOT meant to be edited. They are a snapshot of the out-of-date specification which is no longer being updated. We will not be accepting changes to these documents. diff --git a/doc/TypeScript Language Specification (Change Markup).docx b/doc/TypeScript Language Specification (Change Markup) - ARCHIVED.docx similarity index 100% rename from doc/TypeScript Language Specification (Change Markup).docx rename to doc/TypeScript Language Specification (Change Markup) - ARCHIVED.docx diff --git a/doc/TypeScript Language Specification (Change Markup).pdf b/doc/TypeScript Language Specification (Change Markup) - ARCHIVED.pdf similarity index 100% rename from doc/TypeScript Language Specification (Change Markup).pdf rename to doc/TypeScript Language Specification (Change Markup) - ARCHIVED.pdf diff --git a/doc/TypeScript Language Specification.docx b/doc/TypeScript Language Specification - ARCHIVED.docx similarity index 100% rename from doc/TypeScript Language Specification.docx rename to doc/TypeScript Language Specification - ARCHIVED.docx diff --git a/doc/TypeScript Language Specification.pdf b/doc/TypeScript Language Specification - ARCHIVED.pdf similarity index 100% rename from doc/TypeScript Language Specification.pdf rename to doc/TypeScript Language Specification - ARCHIVED.pdf diff --git a/doc/spec.md b/doc/spec-ARCHIVED.md similarity index 98% rename from doc/spec.md rename to doc/spec-ARCHIVED.md index 741d4f29cec..9b4ca80435a 100644 --- a/doc/spec.md +++ b/doc/spec-ARCHIVED.md @@ -903,7 +903,7 @@ namespace X { // Namespace named X } ``` -A name that denotes a value has an associated type (section [3](#3)) and can be referenced in expressions (section [4.3](#4.3)). A name that denotes a type can be used by itself in a type reference or on the right hand side of a dot in a type reference ([3.8.2](#3.8.2)). A name that denotes a namespace can be used one the left hand side of a dot in a type reference. +A name that denotes a value has an associated type (section [3](#3)) and can be referenced in expressions (section [4.3](#4.3)). A name that denotes a type can be used by itself in a type reference or on the right hand side of a dot in a type reference ([3.8.2](#3.8.2)). A name that denotes a namespace can be used on the left hand side of a dot in a type reference. When a name with multiple meanings is referenced, the context in which the reference occurs determines the meaning. For example: diff --git a/package-lock.json b/package-lock.json new file mode 100644 index 00000000000..e59b26eb2eb --- /dev/null +++ b/package-lock.json @@ -0,0 +1,8574 @@ +{ + "name": "typescript", + "version": "4.1.0", + "lockfileVersion": 1, + "requires": true, + "dependencies": { + "@babel/code-frame": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.10.4.tgz", + "integrity": "sha512-vG6SvB6oYEhvgisZNFRmRCUkLz11c7rp+tbNTynGqc6mS1d5ATd/sGyV6W0KZZnXRKMTzZDRgQT3Ou9jhpAfUg==", + "dev": true, + "requires": { + "@babel/highlight": "^7.10.4" + } + }, + "@babel/helper-validator-identifier": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.10.4.tgz", + "integrity": "sha512-3U9y+43hz7ZM+rzG24Qe2mufW5KhvFg/NhnNph+i9mgCtdTCtMJuI1TMkrIUiK7Ix4PYlRF9I5dhqaLYA/ADXw==", + "dev": true + }, + "@babel/highlight": { + "version": "7.10.4", + "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.10.4.tgz", + "integrity": "sha512-i6rgnR/YgPEQzZZnbTHHuZdlE8qyoBNalD6F+q4vAFlcMEcqmkoG+mPqJYJCo63qPf74+Y1UZsl3l6f7/RIkmA==", + "dev": true, + "requires": { + "@babel/helper-validator-identifier": "^7.10.4", + "chalk": "^2.0.0", + "js-tokens": "^4.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "@esfx/cancelable": { + "version": "1.0.0-pre.13", + "resolved": "https://registry.npmjs.org/@esfx/cancelable/-/cancelable-1.0.0-pre.13.tgz", + "integrity": "sha512-JpcXOrEPh/AMaZ8OGWrjYq+o65/emqxZFnW7NRRS6x8nrHbbZTUHEJnQmjahXkjvliPBgsFqueaLphXP52ACug==", + "dev": true, + "requires": { + "@esfx/disposable": "^1.0.0-pre.13", + "@esfx/internal-deprecate": "^1.0.0-pre.13", + "@esfx/internal-guards": "^1.0.0-pre.11", + "@esfx/internal-tag": "^1.0.0-pre.6", + "tslib": "^1.9.3" + } + }, + "@esfx/disposable": { + "version": "1.0.0-pre.13", + "resolved": "https://registry.npmjs.org/@esfx/disposable/-/disposable-1.0.0-pre.13.tgz", + "integrity": "sha512-rTypmtVgC8nx3gfxHIX96By2UNub0ewRthxUiWE1x/+NTSfzGOHVpVu0H8DF+VQJND04E6srcwwbO+Hpek16GA==", + "dev": true, + "requires": { + "@esfx/internal-deprecate": "^1.0.0-pre.13", + "@esfx/internal-guards": "^1.0.0-pre.11", + "@esfx/internal-tag": "^1.0.0-pre.6", + "tslib": "^1.9.3" + } + }, + "@esfx/internal-deprecate": { + "version": "1.0.0-pre.13", + "resolved": "https://registry.npmjs.org/@esfx/internal-deprecate/-/internal-deprecate-1.0.0-pre.13.tgz", + "integrity": "sha512-uF4EhrILmUJdcDkSQNsr+33XEKaMj92/8804VIHswytdbwaQjQ85dbj1bSB9TFsXG2zkZtJo09NKNQ9p7NvTPQ==", + "dev": true, + "requires": { + "tslib": "^1.9.3" + } + }, + "@esfx/internal-guards": { + "version": "1.0.0-pre.11", + "resolved": "https://registry.npmjs.org/@esfx/internal-guards/-/internal-guards-1.0.0-pre.11.tgz", + "integrity": "sha512-DnRXkwwSrqIaml+sAm/zzpfDOCBnZkzflmGB833AqVYbgopO7xPBobngxqGBhYjutgTmVuXV3GKP0g08h4mQEw==", + "dev": true, + "requires": { + "@esfx/type-model": "^1.0.0-pre.11", + "tslib": "^1.9.3" + } + }, + "@esfx/internal-tag": { + "version": "1.0.0-pre.6", + "resolved": "https://registry.npmjs.org/@esfx/internal-tag/-/internal-tag-1.0.0-pre.6.tgz", + "integrity": "sha512-nODidP9/RBLqX39HL12IhFLgaoBHrC5nrm6D/BwquCGNoPQI9EXNPau+IdmGqeUcaMoVOFLFOkYtnHU52RVngw==", + "dev": true + }, + "@esfx/type-model": { + "version": "1.0.0-pre.11", + "resolved": "https://registry.npmjs.org/@esfx/type-model/-/type-model-1.0.0-pre.11.tgz", + "integrity": "sha512-ImM8fj0HFE2GRPRq+q1xnW3kNaIbZscpJfWjGyeo9KdMxKoI75bJebsA3XK6AH9zbEWba+521V+m6NDvDhcnSw==", + "dev": true, + "requires": { + "tslib": "^1.9.3" + } + }, + "@gulp-sourcemaps/identity-map": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/identity-map/-/identity-map-1.0.2.tgz", + "integrity": "sha512-ciiioYMLdo16ShmfHBXJBOFm3xPC4AuwO4xeRpFeHz7WK9PYsWCmigagG2XyzZpubK4a3qNKoUBDhbzHfa50LQ==", + "dev": true, + "requires": { + "acorn": "^5.0.3", + "css": "^2.2.1", + "normalize-path": "^2.1.1", + "source-map": "^0.6.0", + "through2": "^2.0.3" + }, + "dependencies": { + "acorn": { + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "dev": true + }, + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "@gulp-sourcemaps/map-sources": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@gulp-sourcemaps/map-sources/-/map-sources-1.0.0.tgz", + "integrity": "sha1-iQrnxdjId/bThIYCFazp1+yUW9o=", + "dev": true, + "requires": { + "normalize-path": "^2.0.1", + "through2": "^2.0.3" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "@nodelib/fs.scandir": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.3.tgz", + "integrity": "sha512-eGmwYQn3gxo4r7jdQnkrrN6bY478C3P+a/y72IJukF8LjB6ZHeB3c+Ehacj3sYeSmUXGlnA67/PmbM9CVwL7Dw==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "2.0.3", + "run-parallel": "^1.1.9" + } + }, + "@nodelib/fs.stat": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.3.tgz", + "integrity": "sha512-bQBFruR2TAwoevBEd/NWMoAAtNGzTRgdrqnYCc7dhzfoNvqPzLyqlEQnzZ3kVnNrSp25iyxE00/3h2fqGAGArA==", + "dev": true + }, + "@nodelib/fs.walk": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@nodelib/fs.walk/-/fs.walk-1.2.4.tgz", + "integrity": "sha512-1V9XOY4rDW0rehzbrcqAmHnz8e7SKvX27gh8Gt2WgB0+pdzdiLV83p72kZPU+jvMbS1qU5mauP2iOvO8rhmurQ==", + "dev": true, + "requires": { + "@nodelib/fs.scandir": "2.1.3", + "fastq": "^1.6.0" + } + }, + "@octokit/auth-token": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-2.4.2.tgz", + "integrity": "sha512-jE/lE/IKIz2v1+/P0u4fJqv0kYwXOTujKemJMFr6FeopsxlIK3+wKDCJGnysg81XID5TgZQbIfuJ5J0lnTiuyQ==", + "dev": true, + "requires": { + "@octokit/types": "^5.0.0" + } + }, + "@octokit/core": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@octokit/core/-/core-3.1.2.tgz", + "integrity": "sha512-AInOFULmwOa7+NFi9F8DlDkm5qtZVmDQayi7TUgChE3yeIGPq0Y+6cAEXPexQ3Ea+uZy66hKEazR7DJyU+4wfw==", + "dev": true, + "requires": { + "@octokit/auth-token": "^2.4.0", + "@octokit/graphql": "^4.3.1", + "@octokit/request": "^5.4.0", + "@octokit/types": "^5.0.0", + "before-after-hook": "^2.1.0", + "universal-user-agent": "^6.0.0" + } + }, + "@octokit/endpoint": { + "version": "6.0.6", + "resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-6.0.6.tgz", + "integrity": "sha512-7Cc8olaCoL/mtquB7j/HTbPM+sY6Ebr4k2X2y4JoXpVKQ7r5xB4iGQE0IoO58wIPsUk4AzoT65AMEpymSbWTgQ==", + "dev": true, + "requires": { + "@octokit/types": "^5.0.0", + "is-plain-object": "^5.0.0", + "universal-user-agent": "^6.0.0" + } + }, + "@octokit/graphql": { + "version": "4.5.6", + "resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-4.5.6.tgz", + "integrity": "sha512-Rry+unqKTa3svswT2ZAuqenpLrzJd+JTv89LTeVa5UM/5OX8o4KTkPL7/1ABq4f/ZkELb0XEK/2IEoYwykcLXg==", + "dev": true, + "requires": { + "@octokit/request": "^5.3.0", + "@octokit/types": "^5.0.0", + "universal-user-agent": "^6.0.0" + } + }, + "@octokit/plugin-paginate-rest": { + "version": "2.4.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.4.0.tgz", + "integrity": "sha512-YT6Klz3LLH6/nNgi0pheJnUmTFW4kVnxGft+v8Itc41IIcjl7y1C8TatmKQBbCSuTSNFXO5pCENnqg6sjwpJhg==", + "dev": true, + "requires": { + "@octokit/types": "^5.5.0" + } + }, + "@octokit/plugin-request-log": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-request-log/-/plugin-request-log-1.0.0.tgz", + "integrity": "sha512-ywoxP68aOT3zHCLgWZgwUJatiENeHE7xJzYjfz8WI0goynp96wETBF+d95b8g/uL4QmS6owPVlaxiz3wyMAzcw==", + "dev": true + }, + "@octokit/plugin-rest-endpoint-methods": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/@octokit/plugin-rest-endpoint-methods/-/plugin-rest-endpoint-methods-4.2.0.tgz", + "integrity": "sha512-1/qn1q1C1hGz6W/iEDm9DoyNoG/xdFDt78E3eZ5hHeUfJTLJgyAMdj9chL/cNBHjcjd+FH5aO1x0VCqR2RE0mw==", + "dev": true, + "requires": { + "@octokit/types": "^5.5.0", + "deprecation": "^2.3.1" + } + }, + "@octokit/request": { + "version": "5.4.9", + "resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.9.tgz", + "integrity": "sha512-CzwVvRyimIM1h2n9pLVYfTDmX9m+KHSgCpqPsY8F1NdEK8IaWqXhSBXsdjOBFZSpEcxNEeg4p0UO9cQ8EnOCLA==", + "dev": true, + "requires": { + "@octokit/endpoint": "^6.0.1", + "@octokit/request-error": "^2.0.0", + "@octokit/types": "^5.0.0", + "deprecation": "^2.0.0", + "is-plain-object": "^5.0.0", + "node-fetch": "^2.6.1", + "once": "^1.4.0", + "universal-user-agent": "^6.0.0" + }, + "dependencies": { + "node-fetch": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.1.tgz", + "integrity": "sha512-V4aYg89jEoVRxRb2fJdAg8FHvI7cEyYdVAh94HH0UIK8oJxUfkjlDQN9RbMx+bEjP7+ggMiFRprSti032Oipxw==", + "dev": true + } + } + }, + "@octokit/request-error": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-2.0.2.tgz", + "integrity": "sha512-2BrmnvVSV1MXQvEkrb9zwzP0wXFNbPJij922kYBTLIlIafukrGOb+ABBT2+c6wZiuyWDH1K1zmjGQ0toN/wMWw==", + "dev": true, + "requires": { + "@octokit/types": "^5.0.1", + "deprecation": "^2.0.0", + "once": "^1.4.0" + } + }, + "@octokit/rest": { + "version": "18.0.6", + "resolved": "https://registry.npmjs.org/@octokit/rest/-/rest-18.0.6.tgz", + "integrity": "sha512-ES4lZBKPJMX/yUoQjAZiyFjei9pJ4lTTfb9k7OtYoUzKPDLl/M8jiHqt6qeSauyU4eZGLw0sgP1WiQl9FYeM5w==", + "dev": true, + "requires": { + "@octokit/core": "^3.0.0", + "@octokit/plugin-paginate-rest": "^2.2.0", + "@octokit/plugin-request-log": "^1.0.0", + "@octokit/plugin-rest-endpoint-methods": "4.2.0" + } + }, + "@octokit/types": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/@octokit/types/-/types-5.5.0.tgz", + "integrity": "sha512-UZ1pErDue6bZNjYOotCNveTXArOMZQFG6hKJfOnGnulVCMcVVi7YIIuuR4WfBhjo7zgpmzn/BkPDnUXtNx+PcQ==", + "dev": true, + "requires": { + "@types/node": ">= 8" + } + }, + "@types/browserify": { + "version": "12.0.36", + "resolved": "https://registry.npmjs.org/@types/browserify/-/browserify-12.0.36.tgz", + "integrity": "sha512-hYXvPod5upkYTC7auziOATFsu/0MGxozbzNI80sZV044JTF7UtstHeNOM52b+bg7/taZ3fheK7oeb+jpm4C0/w==", + "dev": true, + "requires": { + "@types/insert-module-globals": "*", + "@types/node": "*" + } + }, + "@types/chai": { + "version": "4.2.12", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-4.2.12.tgz", + "integrity": "sha512-aN5IAC8QNtSUdQzxu7lGBgYAOuU1tmRU4c9dIq5OKGf/SBVjXo+ffM2wEjudAWbgpOhy60nLoAGH1xm8fpCKFQ==", + "dev": true + }, + "@types/color-name": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/@types/color-name/-/color-name-1.1.1.tgz", + "integrity": "sha512-rr+OQyAjxze7GgWrSaJwydHStIhHq2lvY3BOC2Mj7KnzI7XK0Uw1TOOdI9lDoajEbSWLiYgoo4f1R51erQfhPQ==", + "dev": true + }, + "@types/convert-source-map": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/@types/convert-source-map/-/convert-source-map-1.5.1.tgz", + "integrity": "sha512-laiDIXqqthjJlyAMYAXOtN3N8+UlbM+KvZi4BaY5ZOekmVkBs/UxfK5O0HWeJVG2eW8F+Mu2ww13fTX+kY1FlQ==", + "dev": true + }, + "@types/eslint-visitor-keys": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@types/eslint-visitor-keys/-/eslint-visitor-keys-1.0.0.tgz", + "integrity": "sha512-OCutwjDZ4aFS6PB1UZ988C4YgwlBHJd6wCeQqaLdmadZ/7e+w79+hbMUFC1QXDNCmdyoRfAFdm0RypzwR+Qpag==", + "dev": true + }, + "@types/expect": { + "version": "1.20.4", + "resolved": "https://registry.npmjs.org/@types/expect/-/expect-1.20.4.tgz", + "integrity": "sha512-Q5Vn3yjTDyCMV50TB6VRIbQNxSE4OmZR86VSbGaNpfUolm0iePBB4KdEEHmxoY5sT2+2DIvXW0rvMDP2nHZ4Mg==", + "dev": true + }, + "@types/glob": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/@types/glob/-/glob-7.1.3.tgz", + "integrity": "sha512-SEYeGAIQIQX8NN6LDKprLjbrd5dARM5EXsd8GI/A5l0apYI1fGMWgPHSe4ZKL4eozlAyI+doUE9XbYS4xCkQ1w==", + "dev": true, + "requires": { + "@types/minimatch": "*", + "@types/node": "*" + } + }, + "@types/glob-stream": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/@types/glob-stream/-/glob-stream-6.1.0.tgz", + "integrity": "sha512-RHv6ZQjcTncXo3thYZrsbAVwoy4vSKosSWhuhuQxLOTv74OJuFQxXkmUuZCr3q9uNBEVCvIzmZL/FeRNbHZGUg==", + "dev": true, + "requires": { + "@types/glob": "*", + "@types/node": "*" + } + }, + "@types/gulp": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/@types/gulp/-/gulp-4.0.6.tgz", + "integrity": "sha512-0E8/iV/7FKWyQWSmi7jnUvgXXgaw+pfAzEB06Xu+l0iXVJppLbpOye5z7E2klw5akXd+8kPtYuk65YBcZPM4ow==", + "dev": true, + "requires": { + "@types/undertaker": "*", + "@types/vinyl-fs": "*", + "chokidar": "^2.1.2" + } + }, + "@types/gulp-concat": { + "version": "0.0.32", + "resolved": "https://registry.npmjs.org/@types/gulp-concat/-/gulp-concat-0.0.32.tgz", + "integrity": "sha512-CUCFADlITzzBfBa2bdGzhKtvBr4eFh+evb+4igVbvPoO5RyPfHifmyQlZl6lM7q19+OKncRlFXDU7B4X9Ayo2g==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/gulp-newer": { + "version": "0.0.31", + "resolved": "https://registry.npmjs.org/@types/gulp-newer/-/gulp-newer-0.0.31.tgz", + "integrity": "sha512-e7J/Zv5Wd7CC0WpuA2syWVitgwrkG0u221e41w7r07XUR6hMH6kHPkq9tUrusHkbeW8QbuLbis5fODOwQCyggQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/gulp-rename": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/@types/gulp-rename/-/gulp-rename-0.0.33.tgz", + "integrity": "sha512-FIZQvbZJj6V1gHPTzO+g/BCWpDur7fJrroae4gwV3LaoHBQ+MrR9sB+2HssK8fHv4WdY6hVNxkcft9bYatuPIA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/gulp-sourcemaps": { + "version": "0.0.32", + "resolved": "https://registry.npmjs.org/@types/gulp-sourcemaps/-/gulp-sourcemaps-0.0.32.tgz", + "integrity": "sha512-+7BAmptW2bxyJnJcCEuie7vLoop3FwWgCdBMzyv7MYXED/HeNMeQuX7uPCkp4vfU1TTu4CYFH0IckNPvo0VePA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/insert-module-globals": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/@types/insert-module-globals/-/insert-module-globals-7.0.1.tgz", + "integrity": "sha512-qtSfo/jdYHO4jNO6QCp4CwR/TPrvR39Yan5K4nPU1iCmxcnTWiERKDXcvFGuXEmfpjrHeOCvrZPa0UrUsy+mvA==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/jake": { + "version": "0.0.32", + "resolved": "https://registry.npmjs.org/@types/jake/-/jake-0.0.32.tgz", + "integrity": "sha512-uDj5tLTFknk8qmYCTan+1A8eumCxUEa+T8vhY8qf1Ll+uHmA/j9Q0ejxmLY4Bqadphg/nL7FYimf2oQZuzqkbQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/json-schema": { + "version": "7.0.5", + "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.5.tgz", + "integrity": "sha512-7+2BITlgjgDhH0vvwZU/HZJVyk+2XUlvxXe8dFMedNX/aMkaOq++rMAFXc0tM7ij15QaWlbdQASBR9dihi+bDQ==", + "dev": true + }, + "@types/merge2": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/@types/merge2/-/merge2-1.3.0.tgz", + "integrity": "sha512-3xFWjsGhm5GCVlRrcrrVr9oapPxpbG5M3G/4JGF+Gra++7DWoeDOQphCEhyMpbpbptD3w/4PesYIMby/yHrzkQ==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/microsoft__typescript-etw": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/@types/microsoft__typescript-etw/-/microsoft__typescript-etw-0.1.1.tgz", + "integrity": "sha512-zdgHyZJEwbFKI6zhOqWPsNMhlrAk6qMrn9VMA6VQtRt/F+jNJKeaHIMysuO9oTLv0fWcli0gwUrMv8MeFyb3Sw==", + "dev": true + }, + "@types/minimatch": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@types/minimatch/-/minimatch-3.0.3.tgz", + "integrity": "sha512-tHq6qdbT9U1IRSGf14CL0pUlULksvY9OZ+5eEgl1N7t+OA3tGvNpxJCzuKQlsNgCVwbAs670L1vcVQi8j9HjnA==", + "dev": true + }, + "@types/minimist": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.0.tgz", + "integrity": "sha1-aaI6OtKcrwCX8G7aWbNh7i8GOfY=", + "dev": true + }, + "@types/mkdirp": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@types/mkdirp/-/mkdirp-1.0.1.tgz", + "integrity": "sha512-HkGSK7CGAXncr8Qn/0VqNtExEE+PHMWb+qlR1faHMao7ng6P3tAaoWWBMdva0gL5h4zprjIO89GJOLXsMcDm1Q==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/mocha": { + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/@types/mocha/-/mocha-8.0.3.tgz", + "integrity": "sha512-vyxR57nv8NfcU0GZu8EUXZLTbCMupIUwy95LJ6lllN+JRPG25CwMHoB1q5xKh8YKhQnHYRAn4yW2yuHbf/5xgg==", + "dev": true + }, + "@types/ms": { + "version": "0.7.31", + "resolved": "https://registry.npmjs.org/@types/ms/-/ms-0.7.31.tgz", + "integrity": "sha512-iiUgKzV9AuaEkZqkOLDIvlQiL6ltuZd9tGcW3gwpnX8JbuiuhFlEGmmFXEXkN50Cvq7Os88IY2v0dkDqXYWVgA==", + "dev": true + }, + "@types/node": { + "version": "14.11.2", + "resolved": "https://registry.npmjs.org/@types/node/-/node-14.11.2.tgz", + "integrity": "sha512-jiE3QIxJ8JLNcb1Ps6rDbysDhN4xa8DJJvuC9prr6w+1tIh+QAbYyNF3tyiZNLDBIuBCf4KEcV2UvQm/V60xfA==", + "dev": true + }, + "@types/node-fetch": { + "version": "2.5.7", + "resolved": "https://registry.npmjs.org/@types/node-fetch/-/node-fetch-2.5.7.tgz", + "integrity": "sha512-o2WVNf5UhWRkxlf6eq+jMZDu7kjgpgJfl4xVNlvryc95O/6F2ld8ztKX+qu+Rjyet93WAWm5LjeX9H5FGkODvw==", + "dev": true, + "requires": { + "@types/node": "*", + "form-data": "^3.0.0" + } + }, + "@types/q": { + "version": "1.5.4", + "resolved": "https://registry.npmjs.org/@types/q/-/q-1.5.4.tgz", + "integrity": "sha512-1HcDas8SEj4z1Wc696tH56G8OlRaH/sqZOynNNB+HF0WOeXPaxTtbYzJY2oEfiUxjSKjhCKr+MvR7dCHcEelug==", + "dev": true + }, + "@types/source-map-support": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/@types/source-map-support/-/source-map-support-0.5.3.tgz", + "integrity": "sha512-fvjMjVH8Rmokw2dWh1dkj90iX5R8FPjeZzjNH+6eFXReh0QnHFf1YBl3B0CF0RohIAA3SDRJsGeeUWKl6d7HqA==", + "dev": true, + "requires": { + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "@types/through2": { + "version": "2.0.36", + "resolved": "https://registry.npmjs.org/@types/through2/-/through2-2.0.36.tgz", + "integrity": "sha512-vuifQksQHJXhV9McpVsXKuhnf3lsoX70PnhcqIAbs9dqLH2NgrGz0DzZPDY3+Yh6eaRqcE1gnCQ6QhBn1/PT5A==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@types/travis-fold": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/@types/travis-fold/-/travis-fold-0.1.0.tgz", + "integrity": "sha512-qrXB0Div8vIzA8P809JRlh9lD4mSOYwRBJbU1zcj0BWhULP15Zx0oQyJtjaOnkNR5RZcYQDbgimj40M1GDmhcQ==", + "dev": true + }, + "@types/undertaker": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@types/undertaker/-/undertaker-1.2.3.tgz", + "integrity": "sha512-OhvIYx6pUJBxYZf5fM/BVMNXZQMy095kplml+4cWrlNqM1t6XtSIQCuVySGmICZCnzi69Epdljyplm86BlTouQ==", + "dev": true, + "requires": { + "@types/node": "*", + "@types/undertaker-registry": "*" + } + }, + "@types/undertaker-registry": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/@types/undertaker-registry/-/undertaker-registry-1.0.1.tgz", + "integrity": "sha512-Z4TYuEKn9+RbNVk1Ll2SS4x1JeLHecolIbM/a8gveaHsW0Hr+RQMraZACwTO2VD7JvepgA6UO1A1VrbktQrIbQ==", + "dev": true + }, + "@types/vinyl": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/@types/vinyl/-/vinyl-2.0.4.tgz", + "integrity": "sha512-2o6a2ixaVI2EbwBPg1QYLGQoHK56p/8X/sGfKbFC8N6sY9lfjsMf/GprtkQkSya0D4uRiutRZ2BWj7k3JvLsAQ==", + "dev": true, + "requires": { + "@types/expect": "^1.20.4", + "@types/node": "*" + } + }, + "@types/vinyl-fs": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/@types/vinyl-fs/-/vinyl-fs-2.4.11.tgz", + "integrity": "sha512-2OzQSfIr9CqqWMGqmcERE6Hnd2KY3eBVtFaulVo3sJghplUcaeMdL9ZjEiljcQQeHjheWY9RlNmumjIAvsBNaA==", + "dev": true, + "requires": { + "@types/glob-stream": "*", + "@types/node": "*", + "@types/vinyl": "*" + } + }, + "@types/xml2js": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/@types/xml2js/-/xml2js-0.4.5.tgz", + "integrity": "sha512-yohU3zMn0fkhlape1nxXG2bLEGZRc1FeqF80RoHaYXJN7uibaauXfhzhOJr1Xh36sn+/tx21QAOf07b/xYVk1w==", + "dev": true, + "requires": { + "@types/node": "*" + } + }, + "@typescript-eslint/eslint-plugin": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-3.9.1.tgz", + "integrity": "sha512-XIr+Mfv7i4paEdBf0JFdIl9/tVxyj+rlilWIfZ97Be0lZ7hPvUbS5iHt9Glc8kRI53dsr0PcAEudbf8rO2wGgg==", + "dev": true, + "requires": { + "@typescript-eslint/experimental-utils": "3.9.1", + "debug": "^4.1.1", + "functional-red-black-tree": "^1.0.1", + "regexpp": "^3.0.0", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "@typescript-eslint/experimental-utils": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/experimental-utils/-/experimental-utils-3.9.1.tgz", + "integrity": "sha512-lkiZ8iBBaYoyEKhCkkw4SAeatXyBq9Ece5bZXdLe1LWBUwTszGbmbiqmQbwWA8cSYDnjWXp9eDbXpf9Sn0hLAg==", + "dev": true, + "requires": { + "@types/json-schema": "^7.0.3", + "@typescript-eslint/types": "3.9.1", + "@typescript-eslint/typescript-estree": "3.9.1", + "eslint-scope": "^5.0.0", + "eslint-utils": "^2.0.0" + } + }, + "@typescript-eslint/parser": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-3.9.1.tgz", + "integrity": "sha512-y5QvPFUn4Vl4qM40lI+pNWhTcOWtpZAJ8pOEQ21fTTW4xTJkRplMjMRje7LYTXqVKKX9GJhcyweMz2+W1J5bMg==", + "dev": true, + "requires": { + "@types/eslint-visitor-keys": "^1.0.0", + "@typescript-eslint/experimental-utils": "3.9.1", + "@typescript-eslint/types": "3.9.1", + "@typescript-eslint/typescript-estree": "3.9.1", + "eslint-visitor-keys": "^1.1.0" + } + }, + "@typescript-eslint/types": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-3.9.1.tgz", + "integrity": "sha512-15JcTlNQE1BsYy5NBhctnEhEoctjXOjOK+Q+rk8ugC+WXU9rAcS2BYhoh6X4rOaXJEpIYDl+p7ix+A5U0BqPTw==", + "dev": true + }, + "@typescript-eslint/typescript-estree": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-3.9.1.tgz", + "integrity": "sha512-IqM0gfGxOmIKPhiHW/iyAEXwSVqMmR2wJ9uXHNdFpqVvPaQ3dWg302vW127sBpAiqM9SfHhyS40NKLsoMpN2KA==", + "dev": true, + "requires": { + "@typescript-eslint/types": "3.9.1", + "@typescript-eslint/visitor-keys": "3.9.1", + "debug": "^4.1.1", + "glob": "^7.1.6", + "is-glob": "^4.0.1", + "lodash": "^4.17.15", + "semver": "^7.3.2", + "tsutils": "^3.17.1" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "@typescript-eslint/visitor-keys": { + "version": "3.9.1", + "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-3.9.1.tgz", + "integrity": "sha512-zxdtUjeoSh+prCpogswMwVUJfEFmCOjdzK9rpNjNBfm6EyPt99x3RrJoBOGZO23FCt0WPKUCOL5mb/9D5LjdwQ==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "JSONStream": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/JSONStream/-/JSONStream-1.3.5.tgz", + "integrity": "sha512-E+iruNOY8VV9s4JEbe1aNEm6MiszPRr/UfcHMz0TQh1BXSxHK+ASV1R6W4HpjBhSeS+54PIsAMCBmwD06LLsqQ==", + "dev": true, + "requires": { + "jsonparse": "^1.2.0", + "through": ">=2.2.7 <3" + } + }, + "abbrev": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.0.9.tgz", + "integrity": "sha1-kbR5JYinc4wl813W9jdSovh3YTU=", + "dev": true + }, + "acorn": { + "version": "7.4.0", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.0.tgz", + "integrity": "sha512-+G7P8jJmCHr+S+cLfQxygbWhXy+8YTVGzAkpEbcLo2mLoL7tij/VG41QSHACSf5QgYRhMZYHuNc6drJaO0Da+w==", + "dev": true + }, + "acorn-jsx": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.2.0.tgz", + "integrity": "sha512-HiUX/+K2YpkpJ+SzBffkM/AQ2YE03S0U1kjTLVpoJdhZMOWy8qvXVN9JdLqv2QsaQ6MPYQIuNmwD8zOiYUofLQ==", + "dev": true + }, + "acorn-node": { + "version": "1.8.2", + "resolved": "https://registry.npmjs.org/acorn-node/-/acorn-node-1.8.2.tgz", + "integrity": "sha512-8mt+fslDufLYntIoPAaIMUe/lrbrehIiwmR3t2k9LljIzoigEPF27eLk2hy8zSGzmR/ogr7zbRKINMo1u0yh5A==", + "dev": true, + "requires": { + "acorn": "^7.0.0", + "acorn-walk": "^7.0.0", + "xtend": "^4.0.2" + } + }, + "acorn-walk": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-7.2.0.tgz", + "integrity": "sha512-OPdCF6GsMIP+Az+aWfAAOEt2/+iVDKE7oy6lJ098aoe59oAmK76qV6Gw60SbZ8jHuG2wH058GF4pLFbYamYrVA==", + "dev": true + }, + "aggregate-error": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/aggregate-error/-/aggregate-error-3.0.1.tgz", + "integrity": "sha512-quoaXsZ9/BLNae5yiNoUz+Nhkwz83GhWwtYFglcjEQB2NDHCIpApbqXxIFnm4Pq/Nvhrsq5sYJFyohrrxnTGAA==", + "dev": true, + "requires": { + "clean-stack": "^2.0.0", + "indent-string": "^4.0.0" + } + }, + "ajv": { + "version": "6.12.4", + "resolved": "https://registry.npmjs.org/ajv/-/ajv-6.12.4.tgz", + "integrity": "sha512-eienB2c9qVQs2KWexhkrdMLVDoIQCz5KSeLxwg9Lzk4DOfBtIK9PQwwufcsn1jjGuf9WZmqPMbGxOzfcuphJCQ==", + "dev": true, + "requires": { + "fast-deep-equal": "^3.1.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "amdefine": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/amdefine/-/amdefine-1.0.1.tgz", + "integrity": "sha1-SlKCrBZHKek2Gbz9OtFR+BfOkfU=", + "dev": true, + "optional": true + }, + "ansi-colors": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-1.1.0.tgz", + "integrity": "sha512-SFKX67auSNoVR38N3L+nvsPjOE0bybKTYbkf5tRvushrAPQ9V75huw0ZxBkKVeRU9kqH3d6HA4xTckbwZ4ixmA==", + "dev": true, + "requires": { + "ansi-wrap": "^0.1.0" + } + }, + "ansi-cyan": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-cyan/-/ansi-cyan-0.1.1.tgz", + "integrity": "sha1-U4rlKK+JgvKK4w2G8vF0VtJgmHM=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-escapes": { + "version": "4.3.1", + "resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz", + "integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==", + "dev": true, + "requires": { + "type-fest": "^0.11.0" + }, + "dependencies": { + "type-fest": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz", + "integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==", + "dev": true + } + } + }, + "ansi-gray": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-gray/-/ansi-gray-0.1.1.tgz", + "integrity": "sha1-KWLPVOyXksSFEKPetSRDaGHvclE=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-red": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/ansi-red/-/ansi-red-0.1.1.tgz", + "integrity": "sha1-jGOPnRCAgAo1PJwoyKgcpHBdlGw=", + "dev": true, + "requires": { + "ansi-wrap": "0.1.0" + } + }, + "ansi-regex": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.0.tgz", + "integrity": "sha512-bY6fj56OUQ0hU1KjFNDQuJFezqKdrAyFdIevADiqrWHwSlbmBNMHp5ak2f40Pm8JTFyM2mqxkG6ngkHO11f/lg==", + "dev": true + }, + "ansi-styles": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz", + "integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==", + "dev": true, + "requires": { + "@types/color-name": "^1.1.1", + "color-convert": "^2.0.1" + } + }, + "ansi-wrap": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/ansi-wrap/-/ansi-wrap-0.1.0.tgz", + "integrity": "sha1-qCJQ3bABXponyoLoLqYDu/pF768=", + "dev": true + }, + "anymatch": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-2.0.0.tgz", + "integrity": "sha512-5teOsQWABXHHBFP9y3skS5P3d/WfWXpv3FUpy+LorMrNYaT9pI4oLMQX7jzQ2KklNpGpWHzdCXTDT2Y3XGlZBw==", + "dev": true, + "requires": { + "micromatch": "^3.1.4", + "normalize-path": "^2.1.1" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "append-buffer": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/append-buffer/-/append-buffer-1.0.2.tgz", + "integrity": "sha1-2CIM9GYIFSXv6lBhTz3mUU36WPE=", + "dev": true, + "requires": { + "buffer-equal": "^1.0.0" + } + }, + "archy": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/archy/-/archy-1.0.0.tgz", + "integrity": "sha1-+cjBN1fMHde8N5rHeyxipcKGjEA=", + "dev": true + }, + "argparse": { + "version": "1.0.10", + "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", + "integrity": "sha512-o5Roy6tNG4SL/FOkCAN6RzjiakZS25RLYFrcMttJqbdd8BWrnA+fGz57iN5Pb06pvBGvl5gQ0B48dJlslXvoTg==", + "dev": true, + "requires": { + "sprintf-js": "~1.0.2" + } + }, + "arr-diff": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-4.0.0.tgz", + "integrity": "sha1-1kYQdP6/7HHn4VI1dhoyml3HxSA=", + "dev": true + }, + "arr-filter": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/arr-filter/-/arr-filter-1.1.2.tgz", + "integrity": "sha1-Q/3d0JHo7xGqTEXZzcGOLf8XEe4=", + "dev": true, + "requires": { + "make-iterator": "^1.0.0" + } + }, + "arr-flatten": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-flatten/-/arr-flatten-1.1.0.tgz", + "integrity": "sha512-L3hKV5R/p5o81R7O02IGnwpDmkp6E982XhtbuwSe3O4qOtMMMtodicASA1Cny2U+aCXcNpml+m4dPsvsJ3jatg==", + "dev": true + }, + "arr-map": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/arr-map/-/arr-map-2.0.2.tgz", + "integrity": "sha1-Onc0X/wc814qkYJWAfnljy4kysQ=", + "dev": true, + "requires": { + "make-iterator": "^1.0.0" + } + }, + "arr-union": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-3.1.0.tgz", + "integrity": "sha1-45sJrqne+Gao8gbiiK9jkZuuOcQ=", + "dev": true + }, + "array-each": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/array-each/-/array-each-1.0.1.tgz", + "integrity": "sha1-p5SvDAWrF1KEbudTofIRoFugxE8=", + "dev": true + }, + "array-includes": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/array-includes/-/array-includes-3.1.1.tgz", + "integrity": "sha512-c2VXaCHl7zPsvpkFsw4nxvFie4fh1ur9bpcgsVkIjqn0H/Xwdg+7fv3n2r/isyS8EBj5b06M9kHyZuIr4El6WQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0", + "is-string": "^1.0.5" + } + }, + "array-initial": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-initial/-/array-initial-1.1.0.tgz", + "integrity": "sha1-L6dLJnOTccOUe9enrcc74zSz15U=", + "dev": true, + "requires": { + "array-slice": "^1.0.0", + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "array-last": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/array-last/-/array-last-1.3.0.tgz", + "integrity": "sha512-eOCut5rXlI6aCOS7Z7kCplKRKyiFQ6dHFBem4PwlwKeNFk2/XxTrhRh5T9PyaEWGy/NHTZWbY+nsZlNFJu9rYg==", + "dev": true, + "requires": { + "is-number": "^4.0.0" + }, + "dependencies": { + "is-number": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-4.0.0.tgz", + "integrity": "sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==", + "dev": true + } + } + }, + "array-slice": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-1.1.0.tgz", + "integrity": "sha512-B1qMD3RBP7O8o0H2KbrXDyB0IccejMF15+87Lvlor12ONPRHP6gTjXMNkt/d3ZuOGbAe66hFmaCfECI24Ufp6w==", + "dev": true + }, + "array-sort": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/array-sort/-/array-sort-1.0.0.tgz", + "integrity": "sha512-ihLeJkonmdiAsD7vpgN3CRcx2J2S0TiYW+IS/5zHBI7mKUq3ySvBdzzBfD236ubDBQFiiyG3SWCPc+msQ9KoYg==", + "dev": true, + "requires": { + "default-compare": "^1.0.0", + "get-value": "^2.0.6", + "kind-of": "^5.0.2" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "array-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/array-union/-/array-union-2.1.0.tgz", + "integrity": "sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw==", + "dev": true + }, + "array-unique": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/array-unique/-/array-unique-0.3.2.tgz", + "integrity": "sha1-qJS3XUvE9s1nnvMkSp/Y9Gri1Cg=", + "dev": true + }, + "array.prototype.flat": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/array.prototype.flat/-/array.prototype.flat-1.2.3.tgz", + "integrity": "sha512-gBlRZV0VSmfPIeWfuuy56XZMvbVfbEUnOXUvt3F/eUUUSyzlgLxhEX4YAEpxNAogRGehPSnfXyPtYyKAhkzQhQ==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1" + } + }, + "array.prototype.map": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/array.prototype.map/-/array.prototype.map-1.0.2.tgz", + "integrity": "sha512-Az3OYxgsa1g7xDYp86l0nnN4bcmuEITGe1rbdEBVkrqkzMgDcbdQ2R7r41pNzti+4NMces3H8gMmuioZUilLgw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "es-array-method-boxes-properly": "^1.0.0", + "is-string": "^1.0.4" + } + }, + "asn1.js": { + "version": "5.4.1", + "resolved": "https://registry.npmjs.org/asn1.js/-/asn1.js-5.4.1.tgz", + "integrity": "sha512-+I//4cYPccV8LdmBLiX8CYvf9Sp3vQsrqu2QNXRcrbiWvcx/UdlFiqUJJzxRQxgsZmvhXhn4cSKeSmoFjVdupA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "safer-buffer": "^2.1.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } + } + }, + "assert": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/assert/-/assert-1.5.0.tgz", + "integrity": "sha512-EDsgawzwoun2CZkCgtxJbv392v4nbk9XDD06zI+kQYoBM/3RBWLlEyJARDOmhAAosBjWACEkKL6S+lIZtcAubA==", + "dev": true, + "requires": { + "object-assign": "^4.1.1", + "util": "0.10.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.1.tgz", + "integrity": "sha1-sX0I0ya0Qj5Wjv9xn5GwscvfafE=", + "dev": true + }, + "util": { + "version": "0.10.3", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.3.tgz", + "integrity": "sha1-evsa/lCAUkZInj23/g7TeTNqwPk=", + "dev": true, + "requires": { + "inherits": "2.0.1" + } + } + } + }, + "assertion-error": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-1.1.0.tgz", + "integrity": "sha512-jgsaNduz+ndvGyFt3uSuWqvy4lCnIJiovtouQN5JZHOKCS2QuhEdbcQHFhVksz2N2U9hXJo8odG7ETyWlEeuDw==", + "dev": true + }, + "assign-symbols": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/assign-symbols/-/assign-symbols-1.0.0.tgz", + "integrity": "sha1-WWZ/QfrdTyDMvCu5a41Pf3jsA2c=", + "dev": true + }, + "astral-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/astral-regex/-/astral-regex-1.0.0.tgz", + "integrity": "sha512-+Ryf6g3BKoRc7jfp7ad8tM4TtMiaWvbF/1/sQcZPkkS7ag3D5nMBCe2UfOTONtAkaG0tO0ij3C5Lwmf1EiyjHg==", + "dev": true + }, + "async": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/async/-/async-3.2.0.tgz", + "integrity": "sha512-TR2mEZFVOj2pLStYxLht7TyfuRzaydfpxr3k9RpHIzMgw7A64dzsdqCxH1WJyQdoe8T10nDXd9wnEigmiuHIZw==", + "dev": true + }, + "async-done": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/async-done/-/async-done-1.3.2.tgz", + "integrity": "sha512-uYkTP8dw2og1tu1nmza1n1CMW0qb8gWWlwqMmLb7MhBVs4BXrFziT6HXUd+/RlRA/i4H9AkofYloUbs1fwMqlw==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.2", + "process-nextick-args": "^2.0.0", + "stream-exhaust": "^1.0.1" + } + }, + "async-each": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/async-each/-/async-each-1.0.3.tgz", + "integrity": "sha512-z/WhQ5FPySLdvREByI2vZiTWwCnF0moMJ1hK9YQwDTHKh6I7/uSckMetoRGb5UBZPC1z0jlw+n/XCgjeH7y1AQ==", + "dev": true + }, + "async-settle": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/async-settle/-/async-settle-1.0.0.tgz", + "integrity": "sha1-HQqRS7Aldb7IqPOnTlCA9yssDGs=", + "dev": true, + "requires": { + "async-done": "^1.2.2" + } + }, + "asynckit": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=", + "dev": true + }, + "at-least-node": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/at-least-node/-/at-least-node-1.0.0.tgz", + "integrity": "sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg==", + "dev": true + }, + "atob": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/atob/-/atob-2.1.2.tgz", + "integrity": "sha512-Wm6ukoaOGJi/73p/cl2GvLjTI5JM1k/O14isD73YML8StrH/7/lRFgmg8nICZgD3bZZvjwCGxtMOD3wWNAu8cg==", + "dev": true + }, + "azure-devops-node-api": { + "version": "10.1.1", + "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-10.1.1.tgz", + "integrity": "sha512-P4Hyrh/+Nzc2KXQk73z72/GsenSWIH5o8uiyELqykJYs9TWTVCxVwghoR7lPeiY6QVoXkq2S2KtvAgi5fyjl9w==", + "dev": true, + "requires": { + "tunnel": "0.0.6", + "typed-rest-client": "^1.7.3", + "underscore": "1.8.3" + } + }, + "bach": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/bach/-/bach-1.2.0.tgz", + "integrity": "sha1-Szzpa/JxNPeaG0FKUcFONMO9mIA=", + "dev": true, + "requires": { + "arr-filter": "^1.1.1", + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "array-each": "^1.0.0", + "array-initial": "^1.0.0", + "array-last": "^1.1.1", + "async-done": "^1.2.2", + "async-settle": "^1.0.0", + "now-and-later": "^2.0.0" + } + }, + "balanced-match": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.0.tgz", + "integrity": "sha1-ibTRmasr7kneFk6gK4nORi1xt2c=", + "dev": true + }, + "base": { + "version": "0.11.2", + "resolved": "https://registry.npmjs.org/base/-/base-0.11.2.tgz", + "integrity": "sha512-5T6P4xPgpp0YDFvSWwEZ4NoE3aM4QBQXDzmVbraCkFj8zHM+mba8SyqB5DbZWyR7mYHo6Y7BdQo3MoA4m0TeQg==", + "dev": true, + "requires": { + "cache-base": "^1.0.1", + "class-utils": "^0.3.5", + "component-emitter": "^1.2.1", + "define-property": "^1.0.0", + "isobject": "^3.0.1", + "mixin-deep": "^1.2.0", + "pascalcase": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "base64-js": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.3.1.tgz", + "integrity": "sha512-mLQ4i2QO1ytvGWFWmcngKO//JXAQueZvwEKtjgQFM4jIK0kU+ytMfplL8j+n5mspOfjHwoAg+9yhb7BwAHm36g==", + "dev": true + }, + "before-after-hook": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz", + "integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A==", + "dev": true + }, + "binary-extensions": { + "version": "1.13.1", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-1.13.1.tgz", + "integrity": "sha512-Un7MIEDdUC5gNpcGDV97op1Ywk748MpHcFTHoYs6qnj1Z3j7I53VG3nwZhKzoBZmbdRNnb6WRdFlwl7tSDuZGw==", + "dev": true + }, + "bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "optional": true, + "requires": { + "file-uri-to-path": "1.0.0" + } + }, + "bn.js": { + "version": "5.1.3", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-5.1.3.tgz", + "integrity": "sha512-GkTiFpjFtUzU9CbMeJ5iazkCzGL3jrhzerzZIuqLABjbwRaFt33I9tUdSNryIptM+RxDet6OKm2WnLXzW51KsQ==", + "dev": true + }, + "brace-expansion": { + "version": "1.1.11", + "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", + "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", + "dev": true, + "requires": { + "balanced-match": "^1.0.0", + "concat-map": "0.0.1" + } + }, + "braces": { + "version": "2.3.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-2.3.2.tgz", + "integrity": "sha512-aNdbnj9P8PjdXU4ybaWLK2IF3jc/EoDYbC7AazW6to3TRsfXxscC9UXOB5iDiEQrkyIbWp2SLQda4+QAa7nc3w==", + "dev": true, + "requires": { + "arr-flatten": "^1.1.0", + "array-unique": "^0.3.2", + "extend-shallow": "^2.0.1", + "fill-range": "^4.0.0", + "isobject": "^3.0.1", + "repeat-element": "^1.1.2", + "snapdragon": "^0.8.1", + "snapdragon-node": "^2.0.1", + "split-string": "^3.0.2", + "to-regex": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "brorand": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/brorand/-/brorand-1.1.0.tgz", + "integrity": "sha1-EsJe/kCkXjwyPrhnWgoM5XsiNx8=", + "dev": true + }, + "browser-pack": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/browser-pack/-/browser-pack-6.1.0.tgz", + "integrity": "sha512-erYug8XoqzU3IfcU8fUgyHqyOXqIE4tUTTQ+7mqUjQlvnXkOO6OlT9c/ZoJVHYoAaqGxr09CN53G7XIsO4KtWA==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "combine-source-map": "~0.8.0", + "defined": "^1.0.0", + "safe-buffer": "^5.1.1", + "through2": "^2.0.0", + "umd": "^3.0.0" + }, + "dependencies": { + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "browser-resolve": { + "version": "1.11.3", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-1.11.3.tgz", + "integrity": "sha512-exDi1BYWB/6raKHmDTCicQfTkqwN5fioMFV4j8BsfMU4R2DK/QfZfK7kOVkmWCNANf0snkBzqGqAJBao9gZMdQ==", + "dev": true, + "requires": { + "resolve": "1.1.7" + } + }, + "browser-stdout": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/browser-stdout/-/browser-stdout-1.3.1.tgz", + "integrity": "sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw==", + "dev": true + }, + "browserify": { + "version": "16.5.2", + "resolved": "https://registry.npmjs.org/browserify/-/browserify-16.5.2.tgz", + "integrity": "sha512-TkOR1cQGdmXU9zW4YukWzWVSJwrxmNdADFbqbE3HFgQWe5wqZmOawqZ7J/8MPCwk/W8yY7Y0h+7mOtcZxLP23g==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "assert": "^1.4.0", + "browser-pack": "^6.0.1", + "browser-resolve": "^2.0.0", + "browserify-zlib": "~0.2.0", + "buffer": "~5.2.1", + "cached-path-relative": "^1.0.0", + "concat-stream": "^1.6.0", + "console-browserify": "^1.1.0", + "constants-browserify": "~1.0.0", + "crypto-browserify": "^3.0.0", + "defined": "^1.0.0", + "deps-sort": "^2.0.0", + "domain-browser": "^1.2.0", + "duplexer2": "~0.1.2", + "events": "^2.0.0", + "glob": "^7.1.0", + "has": "^1.0.0", + "htmlescape": "^1.1.0", + "https-browserify": "^1.0.0", + "inherits": "~2.0.1", + "insert-module-globals": "^7.0.0", + "labeled-stream-splicer": "^2.0.0", + "mkdirp-classic": "^0.5.2", + "module-deps": "^6.2.3", + "os-browserify": "~0.3.0", + "parents": "^1.0.1", + "path-browserify": "~0.0.0", + "process": "~0.11.0", + "punycode": "^1.3.2", + "querystring-es3": "~0.2.0", + "read-only-stream": "^2.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.1.4", + "shasum": "^1.0.0", + "shell-quote": "^1.6.1", + "stream-browserify": "^2.0.0", + "stream-http": "^3.0.0", + "string_decoder": "^1.1.1", + "subarg": "^1.0.0", + "syntax-error": "^1.1.1", + "through2": "^2.0.0", + "timers-browserify": "^1.0.1", + "tty-browserify": "0.0.1", + "url": "~0.11.0", + "util": "~0.10.1", + "vm-browserify": "^1.0.0", + "xtend": "^4.0.0" + }, + "dependencies": { + "browser-resolve": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-2.0.0.tgz", + "integrity": "sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==", + "dev": true, + "requires": { + "resolve": "^1.17.0" + }, + "dependencies": { + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + } + } + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "browserify-aes": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/browserify-aes/-/browserify-aes-1.2.0.tgz", + "integrity": "sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==", + "dev": true, + "requires": { + "buffer-xor": "^1.0.3", + "cipher-base": "^1.0.0", + "create-hash": "^1.1.0", + "evp_bytestokey": "^1.0.3", + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "browserify-cipher": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/browserify-cipher/-/browserify-cipher-1.0.1.tgz", + "integrity": "sha512-sPhkz0ARKbf4rRQt2hTpAHqn47X3llLkUGn+xEJzLjwY8LRs2p0v7ljvI5EyoRO/mexrNunNECisZs+gw2zz1w==", + "dev": true, + "requires": { + "browserify-aes": "^1.0.4", + "browserify-des": "^1.0.0", + "evp_bytestokey": "^1.0.0" + } + }, + "browserify-des": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/browserify-des/-/browserify-des-1.0.2.tgz", + "integrity": "sha512-BioO1xf3hFwz4kc6iBhI3ieDFompMhrMlnDFC4/0/vd5MokpuAc3R+LYbwTA9A5Yc9pq9UYPqffKpW2ObuwX5A==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "des.js": "^1.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "browserify-rsa": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/browserify-rsa/-/browserify-rsa-4.0.1.tgz", + "integrity": "sha1-IeCr+vbyApzy+vsTNWenAdQTVSQ=", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "randombytes": "^2.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } + } + }, + "browserify-sign": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/browserify-sign/-/browserify-sign-4.2.1.tgz", + "integrity": "sha512-/vrA5fguVAKKAVTNJjgSm1tRQDHUU6DbwO9IROu/0WAzC8PKhucDSh18J0RMvVeHAn5puMd+QHC2erPRNf8lmg==", + "dev": true, + "requires": { + "bn.js": "^5.1.1", + "browserify-rsa": "^4.0.1", + "create-hash": "^1.2.0", + "create-hmac": "^1.1.7", + "elliptic": "^6.5.3", + "inherits": "^2.0.4", + "parse-asn1": "^5.1.5", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } + } + }, + "browserify-zlib": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/browserify-zlib/-/browserify-zlib-0.2.0.tgz", + "integrity": "sha512-Z942RysHXmJrhqk88FmKBVq/v5tqmSkDz7p54G/MGyjMnCFFnC79XWNbg+Vta8W6Wb2qtSZTSxIGkJrRpCFEiA==", + "dev": true, + "requires": { + "pako": "~1.0.5" + } + }, + "buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.2.1.tgz", + "integrity": "sha512-c+Ko0loDaFfuPWiL02ls9Xd3GO3cPVmUobQ6t3rXNUk304u6hGq+8N/kFi+QEIKhzK3uwolVhLzszmfLmMLnqg==", + "dev": true, + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "buffer-equal": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/buffer-equal/-/buffer-equal-1.0.0.tgz", + "integrity": "sha1-WWFrSYME1Var1GaWayLu2j7KX74=", + "dev": true + }, + "buffer-from": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/buffer-from/-/buffer-from-1.1.1.tgz", + "integrity": "sha512-MQcXEUbCKtEo7bhqEs6560Hyd4XaovZlO/k9V3hjVUF/zwW7KBVdSK4gIt/bzwS9MbR5qob+F5jusZsb0YQK2A==", + "dev": true + }, + "buffer-xor": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/buffer-xor/-/buffer-xor-1.0.3.tgz", + "integrity": "sha1-JuYe0UIvtw3ULm42cp7VHYVf6Nk=", + "dev": true + }, + "builtin-status-codes": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/builtin-status-codes/-/builtin-status-codes-3.0.0.tgz", + "integrity": "sha1-hZgoeOIbmOHGZCXgPQF0eI9Wnug=", + "dev": true + }, + "cache-base": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/cache-base/-/cache-base-1.0.1.tgz", + "integrity": "sha512-AKcdTnFSWATd5/GCPRxr2ChwIJ85CeyrEyjRHlKxQ56d4XJMGym0uAiKn0xbLOGOl3+yRpOTi484dVCEc5AUzQ==", + "dev": true, + "requires": { + "collection-visit": "^1.0.0", + "component-emitter": "^1.2.1", + "get-value": "^2.0.6", + "has-value": "^1.0.0", + "isobject": "^3.0.1", + "set-value": "^2.0.0", + "to-object-path": "^0.3.0", + "union-value": "^1.0.0", + "unset-value": "^1.0.0" + } + }, + "cached-path-relative": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/cached-path-relative/-/cached-path-relative-1.0.2.tgz", + "integrity": "sha512-5r2GqsoEb4qMTTN9J+WzXfjov+hjxT+j3u5K+kIVNIwAd99DLCJE9pBIMP1qVeybV6JiijL385Oz0DcYxfbOIg==", + "dev": true + }, + "callsites": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/callsites/-/callsites-3.1.0.tgz", + "integrity": "sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==", + "dev": true + }, + "camelcase": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-3.0.0.tgz", + "integrity": "sha1-MvxLn82vhF/N9+c7uXysImHwqwo=", + "dev": true + }, + "chai": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/chai/-/chai-4.2.0.tgz", + "integrity": "sha512-XQU3bhBukrOsQCuwZndwGcCVQHyZi53fQ6Ys1Fym7E4olpIqqZZhhoFJoaKVvV17lWQoXYwgWN2nF5crA8J2jw==", + "dev": true, + "requires": { + "assertion-error": "^1.1.0", + "check-error": "^1.0.2", + "deep-eql": "^3.0.1", + "get-func-name": "^2.0.0", + "pathval": "^1.1.0", + "type-detect": "^4.0.5" + } + }, + "chalk": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.0.tgz", + "integrity": "sha512-qwx12AxXe2Q5xQ43Ac//I6v5aXTipYrSESdOgzrN+9XjgEpyjpKuvSGaN4qE93f7TQTlerQQ8S+EQ0EyDoVL1A==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + }, + "chardet": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/chardet/-/chardet-0.7.0.tgz", + "integrity": "sha512-mT8iDcrh03qDGRRmoA2hmBJnxpllMR+0/0qlzjqZES6NdiWDcZkCNAk4rPFZ9Q85r27unkiNNg8ZOiwZXBHwcA==", + "dev": true + }, + "check-error": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-1.0.2.tgz", + "integrity": "sha1-V00xLt2Iu13YkS6Sht1sCu1KrII=", + "dev": true + }, + "chokidar": { + "version": "2.1.8", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-2.1.8.tgz", + "integrity": "sha512-ZmZUazfOzf0Nve7duiCKD23PFSCs4JPoYyccjUFF3aQkQadqBhfzhjkwBH2mNOG9cTBwhamM37EIsIkZw3nRgg==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-each": "^1.0.1", + "braces": "^2.3.2", + "fsevents": "^1.2.7", + "glob-parent": "^3.1.0", + "inherits": "^2.0.3", + "is-binary-path": "^1.0.0", + "is-glob": "^4.0.0", + "normalize-path": "^3.0.0", + "path-is-absolute": "^1.0.0", + "readdirp": "^2.2.1", + "upath": "^1.1.1" + } + }, + "cipher-base": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/cipher-base/-/cipher-base-1.0.4.tgz", + "integrity": "sha512-Kkht5ye6ZGmwv40uUDZztayT2ThLQGfnj/T71N/XzeZeo3nf8foyW7zGTsPYkEya3m5f3cAypH+qe7YOrM1U2Q==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "class-utils": { + "version": "0.3.6", + "resolved": "https://registry.npmjs.org/class-utils/-/class-utils-0.3.6.tgz", + "integrity": "sha512-qOhPa/Fj7s6TY8H8esGu5QNpMMQxz79h+urzrNYN6mn+9BnxlDGf5QZ+XeCDsxSjPqsSR56XOZOJmpeurnLMeg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "define-property": "^0.2.5", + "isobject": "^3.0.0", + "static-extend": "^0.1.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "clean-stack": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/clean-stack/-/clean-stack-2.2.0.tgz", + "integrity": "sha512-4diC9HaTE+KRAMWhDhrGOECgWZxoevMc5TlkObMqNSsVU62PYzXZ/SMTjzyGAFF1YusgxGcSWTEXBhp0CPwQ1A==", + "dev": true + }, + "cli-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/cli-cursor/-/cli-cursor-3.1.0.tgz", + "integrity": "sha512-I/zHAwsKf9FqGoXM4WWRACob9+SNukZTd94DWF57E4toouRulbCxcUh6RKUEOQlYTHJnzkPMySvPNaaSLNfLZw==", + "dev": true, + "requires": { + "restore-cursor": "^3.1.0" + } + }, + "cli-width": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/cli-width/-/cli-width-3.0.0.tgz", + "integrity": "sha512-FxqpkPPwu1HjuN93Omfm4h8uIanXofW0RxVEW3k5RKx+mJJYSthzNhp32Kzxxy3YAEZ/Dc/EWN1vZRY0+kOhbw==", + "dev": true + }, + "cliui": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-3.2.0.tgz", + "integrity": "sha1-EgYBU3qRbSmUD5NNo7SNWFo5IT0=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1", + "wrap-ansi": "^2.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "clone": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/clone/-/clone-2.1.2.tgz", + "integrity": "sha1-G39Ln1kfHo+DZwQBYANFoCiHQ18=", + "dev": true + }, + "clone-buffer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-buffer/-/clone-buffer-1.0.0.tgz", + "integrity": "sha1-4+JbIHrE5wGvch4staFnksrD3Fg=", + "dev": true + }, + "clone-stats": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/clone-stats/-/clone-stats-1.0.0.tgz", + "integrity": "sha1-s3gt/4u1R04Yuba/D9/ngvh3doA=", + "dev": true + }, + "cloneable-readable": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/cloneable-readable/-/cloneable-readable-1.1.3.tgz", + "integrity": "sha512-2EF8zTQOxYq70Y4XKtorQupqF0m49MBz2/yf5Bj+MHjvpG3Hy7sImifnqD6UA+TKYxeSV+u6qqQPawN5UvnpKQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "process-nextick-args": "^2.0.0", + "readable-stream": "^2.3.5" + } + }, + "code-point-at": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/code-point-at/-/code-point-at-1.1.0.tgz", + "integrity": "sha1-DQcLTQQ6W+ozovGkDi7bPZpMz3c=", + "dev": true + }, + "collection-map": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-map/-/collection-map-1.0.0.tgz", + "integrity": "sha1-rqDwb40mx4DCt1SUOFVEsiVa8Yw=", + "dev": true, + "requires": { + "arr-map": "^2.0.2", + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "collection-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/collection-visit/-/collection-visit-1.0.0.tgz", + "integrity": "sha1-S8A3PBZLwykbTTaMgpzxqApZ3KA=", + "dev": true, + "requires": { + "map-visit": "^1.0.0", + "object-visit": "^1.0.0" + } + }, + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true + }, + "color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true + }, + "combine-source-map": { + "version": "0.8.0", + "resolved": "https://registry.npmjs.org/combine-source-map/-/combine-source-map-0.8.0.tgz", + "integrity": "sha1-pY0N8ELBhvz4IqjoAV9UUNLXmos=", + "dev": true, + "requires": { + "convert-source-map": "~1.1.0", + "inline-source-map": "~0.6.0", + "lodash.memoize": "~3.0.3", + "source-map": "~0.5.3" + }, + "dependencies": { + "convert-source-map": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.1.3.tgz", + "integrity": "sha1-SCnId+n+SbMWHzvzZziI4gRpmGA=", + "dev": true + } + } + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz", + "integrity": "sha512-FQN4MRfuJeHf7cBbBMJFXhKSDq+2kAArBlmRBvcvFE5BB1HZKXtSFASDhdlz9zOYwxh8lDdnvmMOe/+5cdoEdg==", + "dev": true, + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "comment-parser": { + "version": "0.7.6", + "resolved": "https://registry.npmjs.org/comment-parser/-/comment-parser-0.7.6.tgz", + "integrity": "sha512-GKNxVA7/iuTnAqGADlTWX4tkhzxZKXp5fLJqKTlQLHkE65XDUKutZ3BHaJC5IGcper2tT3QRD1xr4o3jNpgXXg==", + "dev": true + }, + "component-emitter": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/component-emitter/-/component-emitter-1.3.0.tgz", + "integrity": "sha512-Rd3se6QB+sO1TwqZjscQrurpEPIfO0/yYnSin6Q/rD3mOutHvUrCAhJub3r90uNb+SESBuE0QYoB90YdfatsRg==", + "dev": true + }, + "concat-map": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", + "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", + "dev": true + }, + "concat-stream": { + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-1.6.2.tgz", + "integrity": "sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^2.2.2", + "typedarray": "^0.0.6" + } + }, + "concat-with-sourcemaps": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/concat-with-sourcemaps/-/concat-with-sourcemaps-1.1.0.tgz", + "integrity": "sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==", + "dev": true, + "requires": { + "source-map": "^0.6.1" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "console-browserify": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/console-browserify/-/console-browserify-1.2.0.tgz", + "integrity": "sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==", + "dev": true + }, + "constants-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/constants-browserify/-/constants-browserify-1.0.0.tgz", + "integrity": "sha1-wguW2MYXdIqvHBYCF2DNJ/y4y3U=", + "dev": true + }, + "contains-path": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/contains-path/-/contains-path-0.1.0.tgz", + "integrity": "sha1-/ozxhP9mcLa67wGp1IYaXL7EEgo=", + "dev": true + }, + "convert-source-map": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-1.7.0.tgz", + "integrity": "sha512-4FJkXzKXEDB1snCFZlLP4gpC3JILicCpGbzG9f9G7tGqGCzETQ2hWPrcinA9oU4wtf2biUaEH5065UnMeR33oA==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.1" + } + }, + "copy-descriptor": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/copy-descriptor/-/copy-descriptor-0.1.1.tgz", + "integrity": "sha1-Z29us8OZl8LuGsOpJP1hJHSPV40=", + "dev": true + }, + "copy-props": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/copy-props/-/copy-props-2.0.4.tgz", + "integrity": "sha512-7cjuUME+p+S3HZlbllgsn2CDwS+5eCCX16qBgNC4jgSTf49qR1VKy/Zhl400m0IQXl/bPGEVqncgUUMjrr4s8A==", + "dev": true, + "requires": { + "each-props": "^1.3.0", + "is-plain-object": "^2.0.1" + }, + "dependencies": { + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + } + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/core-util-is/-/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=", + "dev": true + }, + "create-ecdh": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/create-ecdh/-/create-ecdh-4.0.4.tgz", + "integrity": "sha512-mf+TCx8wWc9VpuxfP2ht0iSISLZnt0JgWlrOKZiNqyUZWnjIaCIVNQArMHnCZKfEYRg6IM7A+NeJoN8gf/Ws0A==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "elliptic": "^6.5.3" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } + } + }, + "create-hash": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/create-hash/-/create-hash-1.2.0.tgz", + "integrity": "sha512-z00bCGNHDG8mHAkP7CtT1qVu+bFQUPjYq/4Iv3C3kWjTFV10zIjfSoeqXo9Asws8gwSHDGj/hl2u4OGIjapeCg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.1", + "inherits": "^2.0.1", + "md5.js": "^1.3.4", + "ripemd160": "^2.0.1", + "sha.js": "^2.4.0" + } + }, + "create-hmac": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/create-hmac/-/create-hmac-1.1.7.tgz", + "integrity": "sha512-MJG9liiZ+ogc4TzUwuvbER1JRdgvUFSB5+VR/g5h82fGaIRWMWddtKBHi7/sVhfjQZ6SehlyhvQYrcYkaUIpLg==", + "dev": true, + "requires": { + "cipher-base": "^1.0.3", + "create-hash": "^1.1.0", + "inherits": "^2.0.1", + "ripemd160": "^2.0.0", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "cross-spawn": { + "version": "6.0.5", + "resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-6.0.5.tgz", + "integrity": "sha512-eTVLrBSt7fjbDygz805pMnstIs2VTBNkRm0qxZd+M7A5XDdxVRWO5MxGBXZhjY4cqLYLdtrGqRf8mBPmzwSpWQ==", + "dev": true, + "requires": { + "nice-try": "^1.0.4", + "path-key": "^2.0.1", + "semver": "^5.5.0", + "shebang-command": "^1.2.0", + "which": "^1.2.9" + }, + "dependencies": { + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "crypto-browserify": { + "version": "3.12.0", + "resolved": "https://registry.npmjs.org/crypto-browserify/-/crypto-browserify-3.12.0.tgz", + "integrity": "sha512-fz4spIh+znjO2VjL+IdhEpRJ3YN6sMzITSBijk6FK2UvTqruSQW+/cCZTSNsMiZNvUeq0CqurF+dAbyiGOY6Wg==", + "dev": true, + "requires": { + "browserify-cipher": "^1.0.0", + "browserify-sign": "^4.0.0", + "create-ecdh": "^4.0.0", + "create-hash": "^1.1.0", + "create-hmac": "^1.1.0", + "diffie-hellman": "^5.0.0", + "inherits": "^2.0.1", + "pbkdf2": "^3.0.3", + "public-encrypt": "^4.0.0", + "randombytes": "^2.0.0", + "randomfill": "^1.0.3" + } + }, + "css": { + "version": "2.2.4", + "resolved": "https://registry.npmjs.org/css/-/css-2.2.4.tgz", + "integrity": "sha512-oUnjmWpy0niI3x/mPL8dVEI1l7MnG3+HHyRPHf+YFSbK+svOhXpmSOcDURUh2aOCgl2grzrOPt1nHLuCVFULLw==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "source-map": "^0.6.1", + "source-map-resolve": "^0.5.2", + "urix": "^0.1.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "d": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/d/-/d-1.0.1.tgz", + "integrity": "sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA==", + "dev": true, + "requires": { + "es5-ext": "^0.10.50", + "type": "^1.0.1" + } + }, + "dash-ast": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/dash-ast/-/dash-ast-1.0.0.tgz", + "integrity": "sha512-Vy4dx7gquTeMcQR/hDkYLGUnwVil6vk4FOOct+djUnHOUWt+zJPJAaRIXaAFkPXtJjvlY7o3rfRu0/3hpnwoUA==", + "dev": true + }, + "debug": { + "version": "2.6.9", + "resolved": "https://registry.npmjs.org/debug/-/debug-2.6.9.tgz", + "integrity": "sha512-bC7ElrdJaJnPbAP+1EotYvqZsb3ecl5wi6Bfi6BJTUcNowp6cvspg0jXznRTKDjm/E7AdgFBVeAPVMNcKGsHMA==", + "dev": true, + "requires": { + "ms": "2.0.0" + }, + "dependencies": { + "ms": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.0.0.tgz", + "integrity": "sha1-VgiurfwAvmwpAd9fmGF4jeDVl8g=", + "dev": true + } + } + }, + "debug-fabulous": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/debug-fabulous/-/debug-fabulous-1.1.0.tgz", + "integrity": "sha512-GZqvGIgKNlUnHUPQhepnUZFIMoi3dgZKQBzKDeL2g7oJF9SNAji/AAu36dusFUas0O+pae74lNeoIPHqXWDkLg==", + "dev": true, + "requires": { + "debug": "3.X", + "memoizee": "0.4.X", + "object-assign": "4.X" + }, + "dependencies": { + "debug": { + "version": "3.2.6", + "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.6.tgz", + "integrity": "sha512-mel+jf7nrtEl5Pn1Qx46zARXKDpBbvzezse7p7LqINmdoIk8PYP5SySaxEmYv6TZ0JyEKA1hsCId6DIhgITtWQ==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + } + } + }, + "decamelize": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/decamelize/-/decamelize-1.2.0.tgz", + "integrity": "sha1-9lNNFRSCabIDUue+4m9QH5oZEpA=", + "dev": true + }, + "decode-uri-component": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz", + "integrity": "sha1-6zkTMzRYd1y4TNGh+uBiEGu4dUU=", + "dev": true + }, + "deep-eql": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-3.0.1.tgz", + "integrity": "sha512-+QeIQyN5ZuO+3Uk5DYh6/1eKO0m0YmJFGNmFHGACpf1ClL1nmlV/p4gNgbl2pJGxgXb4faqo6UE+M5ACEMyVcw==", + "dev": true, + "requires": { + "type-detect": "^4.0.0" + } + }, + "deep-is": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/deep-is/-/deep-is-0.1.3.tgz", + "integrity": "sha1-s2nW+128E+7PUk+RsHD+7cNXzzQ=", + "dev": true + }, + "default-compare": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/default-compare/-/default-compare-1.0.0.tgz", + "integrity": "sha512-QWfXlM0EkAbqOCbD/6HjdwT19j7WCkMyiRhWilc4H9/5h/RzTF9gv5LYh1+CmDV5d1rki6KAWLtQale0xt20eQ==", + "dev": true, + "requires": { + "kind-of": "^5.0.2" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "default-resolution": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/default-resolution/-/default-resolution-2.0.0.tgz", + "integrity": "sha1-vLgrqnKtebQmp2cy8aga1t8m1oQ=", + "dev": true + }, + "define-properties": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/define-properties/-/define-properties-1.1.3.tgz", + "integrity": "sha512-3MqfYKj2lLzdMSf8ZIZE/V+Zuy+BgD6f164e8K2w7dgnpKArBDerGYpM46IYYcjnkdPNMjPk9A6VFB8+3SKlXQ==", + "dev": true, + "requires": { + "object-keys": "^1.0.12" + } + }, + "define-property": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-2.0.2.tgz", + "integrity": "sha512-jwK2UV4cnPpbcG7+VRARKTZPUWowwXA8bzH5NP6ud0oeAxyYPuGZUAC7hMugpCdz4BeSZl2Dl9k66CHJ/46ZYQ==", + "dev": true, + "requires": { + "is-descriptor": "^1.0.2", + "isobject": "^3.0.1" + }, + "dependencies": { + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "defined": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/defined/-/defined-1.0.0.tgz", + "integrity": "sha1-yY2bzvdWdBiOEQlpFRGZ45sfppM=", + "dev": true + }, + "del": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/del/-/del-5.1.0.tgz", + "integrity": "sha512-wH9xOVHnczo9jN2IW68BabcecVPxacIA3g/7z6vhSU/4stOKQzeCRK0yD0A24WiAAUJmmVpWqrERcTxnLo3AnA==", + "dev": true, + "requires": { + "globby": "^10.0.1", + "graceful-fs": "^4.2.2", + "is-glob": "^4.0.1", + "is-path-cwd": "^2.2.0", + "is-path-inside": "^3.0.1", + "p-map": "^3.0.0", + "rimraf": "^3.0.0", + "slash": "^3.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delayed-stream/-/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=", + "dev": true + }, + "deprecation": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/deprecation/-/deprecation-2.3.1.tgz", + "integrity": "sha512-xmHIy4F3scKVwMsQ4WnVaS8bHOx0DmVwRywosKhaILI0ywMDWPtBSku2HNxRvF7jtwDRsoEwYQSfbxj8b7RlJQ==", + "dev": true + }, + "deps-sort": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/deps-sort/-/deps-sort-2.0.1.tgz", + "integrity": "sha512-1orqXQr5po+3KI6kQb9A4jnXT1PBwggGl2d7Sq2xsnOeI9GPcE/tGcF9UiSZtZBM7MukY4cAh7MemS6tZYipfw==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "shasum-object": "^1.0.0", + "subarg": "^1.0.0", + "through2": "^2.0.0" + }, + "dependencies": { + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "des.js": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/des.js/-/des.js-1.0.1.tgz", + "integrity": "sha512-Q0I4pfFrv2VPd34/vfLrFOoRmlYj3OV50i7fskps1jZWK1kApMWWT9G6RRUeYedLcBDIhnSDaUvJMb3AhUlaEA==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0" + } + }, + "detect-file": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/detect-file/-/detect-file-1.0.0.tgz", + "integrity": "sha1-8NZtA2cqglyxtzvbP+YjEMjlUrc=", + "dev": true + }, + "detect-newline": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-2.1.0.tgz", + "integrity": "sha1-9B8cEL5LAOh7XxPaaAdZ8sW/0+I=", + "dev": true + }, + "detective": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/detective/-/detective-5.2.0.tgz", + "integrity": "sha512-6SsIx+nUUbuK0EthKjv0zrdnajCCXVYGmbYYiYjFVpzcjwEs/JMDZ8tPRG29J/HhN56t3GJp2cGSWDRjjot8Pg==", + "dev": true, + "requires": { + "acorn-node": "^1.6.1", + "defined": "^1.0.0", + "minimist": "^1.1.1" + } + }, + "diff": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/diff/-/diff-4.0.2.tgz", + "integrity": "sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==", + "dev": true + }, + "diffie-hellman": { + "version": "5.0.3", + "resolved": "https://registry.npmjs.org/diffie-hellman/-/diffie-hellman-5.0.3.tgz", + "integrity": "sha512-kqag/Nl+f3GwyK25fhUMYj81BUOrZ9IuJsjIcDE5icNM9FJHAVm3VcUDxdLPoQtTuUylWm6ZIknYJwwaPxsUzg==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "miller-rabin": "^4.0.0", + "randombytes": "^2.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } + } + }, + "dir-glob": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/dir-glob/-/dir-glob-3.0.1.tgz", + "integrity": "sha512-WkrWp9GR4KXfKGYzOLmTuGVi1UWFfws377n9cc55/tb6DuqyF6pcQ5AbiHEshaDpY9v6oaSr2XCDidGmMwdzIA==", + "dev": true, + "requires": { + "path-type": "^4.0.0" + } + }, + "doctrine": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-3.0.0.tgz", + "integrity": "sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==", + "dev": true, + "requires": { + "esutils": "^2.0.2" + } + }, + "domain-browser": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/domain-browser/-/domain-browser-1.2.0.tgz", + "integrity": "sha512-jnjyiM6eRyZl2H+W8Q/zLMA481hzi0eszAaBUzIVnmYVDBbnLxVNnfu1HgEBvCbL+71FrxMl3E6lpKH7Ge3OXA==", + "dev": true + }, + "duplexer2": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/duplexer2/-/duplexer2-0.1.4.tgz", + "integrity": "sha1-ixLauHjA1p4+eJEFFmKjL8a93ME=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "duplexify": { + "version": "3.7.1", + "resolved": "https://registry.npmjs.org/duplexify/-/duplexify-3.7.1.tgz", + "integrity": "sha512-07z8uv2wMyS51kKhD1KsdXJg5WQ6t93RneqRxUHnskXVtlYYkLqM0gqStQZ3pj073g687jPCHrqNfCzawLYh5g==", + "dev": true, + "requires": { + "end-of-stream": "^1.0.0", + "inherits": "^2.0.1", + "readable-stream": "^2.0.0", + "stream-shift": "^1.0.0" + } + }, + "each-props": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/each-props/-/each-props-1.3.2.tgz", + "integrity": "sha512-vV0Hem3zAGkJAyU7JSjixeU66rwdynTAa1vofCrSA5fEln+m67Az9CcnkVD776/fsN/UjIWmBDoNRS6t6G9RfA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.1", + "object.defaults": "^1.1.0" + }, + "dependencies": { + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + } + } + }, + "elliptic": { + "version": "6.5.3", + "resolved": "https://registry.npmjs.org/elliptic/-/elliptic-6.5.3.tgz", + "integrity": "sha512-IMqzv5wNQf+E6aHeIqATs0tOLeOTwj1QKbRcS3jBbYkl5oLAserA8yJTT7/VyHUYG91PRmPyeQDObKLPpeS4dw==", + "dev": true, + "requires": { + "bn.js": "^4.4.0", + "brorand": "^1.0.1", + "hash.js": "^1.0.0", + "hmac-drbg": "^1.0.0", + "inherits": "^2.0.1", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.0" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } + } + }, + "emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true + }, + "end-of-stream": { + "version": "1.4.4", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", + "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", + "dev": true, + "requires": { + "once": "^1.4.0" + } + }, + "error-ex": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/error-ex/-/error-ex-1.3.2.tgz", + "integrity": "sha512-7dFHNmqeFSEt2ZBsCriorKnn3Z2pj+fd9kmI6QoWw4//DL+icEBfc0U7qJCisqrTsKTjw4fNFy2pW9OqStD84g==", + "dev": true, + "requires": { + "is-arrayish": "^0.2.1" + } + }, + "es-abstract": { + "version": "1.17.6", + "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.17.6.tgz", + "integrity": "sha512-Fr89bON3WFyUi5EvAeI48QTWX0AyekGgLA8H+c+7fbfCkJwRWRMLd8CQedNEyJuoYYhmtEqY92pgte1FAhBlhw==", + "dev": true, + "requires": { + "es-to-primitive": "^1.2.1", + "function-bind": "^1.1.1", + "has": "^1.0.3", + "has-symbols": "^1.0.1", + "is-callable": "^1.2.0", + "is-regex": "^1.1.0", + "object-inspect": "^1.7.0", + "object-keys": "^1.1.1", + "object.assign": "^4.1.0", + "string.prototype.trimend": "^1.0.1", + "string.prototype.trimstart": "^1.0.1" + } + }, + "es-array-method-boxes-properly": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/es-array-method-boxes-properly/-/es-array-method-boxes-properly-1.0.0.tgz", + "integrity": "sha512-wd6JXUmyHmt8T5a2xreUwKcGPq6f1f+WwIJkijUqiGcJz1qqnZgP6XIK+QyIWU5lT7imeNxUll48bziG+TSYcA==", + "dev": true + }, + "es-get-iterator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/es-get-iterator/-/es-get-iterator-1.1.0.tgz", + "integrity": "sha512-UfrmHuWQlNMTs35e1ypnvikg6jCz3SK8v8ImvmDsh36fCVUR1MqoFDiyn0/k52C8NqO3YsO8Oe0azeesNuqSsQ==", + "dev": true, + "requires": { + "es-abstract": "^1.17.4", + "has-symbols": "^1.0.1", + "is-arguments": "^1.0.4", + "is-map": "^2.0.1", + "is-set": "^2.0.1", + "is-string": "^1.0.5", + "isarray": "^2.0.5" + }, + "dependencies": { + "isarray": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-2.0.5.tgz", + "integrity": "sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw==", + "dev": true + } + } + }, + "es-to-primitive": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/es-to-primitive/-/es-to-primitive-1.2.1.tgz", + "integrity": "sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==", + "dev": true, + "requires": { + "is-callable": "^1.1.4", + "is-date-object": "^1.0.1", + "is-symbol": "^1.0.2" + } + }, + "es5-ext": { + "version": "0.10.53", + "resolved": "https://registry.npmjs.org/es5-ext/-/es5-ext-0.10.53.tgz", + "integrity": "sha512-Xs2Stw6NiNHWypzRTY1MtaG/uJlwCk8kH81920ma8mvN8Xq1gsfhZvpkImLQArw8AHnv8MT2I45J3c0R8slE+Q==", + "dev": true, + "requires": { + "es6-iterator": "~2.0.3", + "es6-symbol": "~3.1.3", + "next-tick": "~1.0.0" + } + }, + "es6-iterator": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-iterator/-/es6-iterator-2.0.3.tgz", + "integrity": "sha1-p96IkUGgWpSwhUQDstCg+/qY87c=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.35", + "es6-symbol": "^3.1.1" + } + }, + "es6-symbol": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/es6-symbol/-/es6-symbol-3.1.3.tgz", + "integrity": "sha512-NJ6Yn3FuDinBaBRWl/q5X/s4koRHBrgKAu+yGI6JCBeiu3qrcbJhwT2GeR/EXVfylRk8dpQVJoLEFhK+Mu31NA==", + "dev": true, + "requires": { + "d": "^1.0.1", + "ext": "^1.1.2" + } + }, + "es6-weak-map": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/es6-weak-map/-/es6-weak-map-2.0.3.tgz", + "integrity": "sha512-p5um32HOTO1kP+w7PRnB+5lQ43Z6muuMuIMffvDN8ZB4GcnjLBV6zGStpbASIMk4DCAvEaamhe2zhyCb/QXXsA==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.46", + "es6-iterator": "^2.0.3", + "es6-symbol": "^3.1.1" + } + }, + "escape-string-regexp": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", + "integrity": "sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ=", + "dev": true + }, + "escodegen": { + "version": "1.8.1", + "resolved": "https://registry.npmjs.org/escodegen/-/escodegen-1.8.1.tgz", + "integrity": "sha1-WltTr0aTEQvrsIZ6o0MN07cKEBg=", + "dev": true, + "requires": { + "esprima": "^2.7.1", + "estraverse": "^1.9.1", + "esutils": "^2.0.2", + "optionator": "^0.8.1", + "source-map": "~0.2.0" + }, + "dependencies": { + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "estraverse": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-1.9.3.tgz", + "integrity": "sha1-r2fy3JIlgkFZUJJgkaQAXSnJu0Q=", + "dev": true + }, + "source-map": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.2.0.tgz", + "integrity": "sha1-2rc/vPwrqBm03gO9b26qSBZLP50=", + "dev": true, + "optional": true, + "requires": { + "amdefine": ">=0.0.4" + } + } + } + }, + "eslint": { + "version": "6.8.0", + "resolved": "https://registry.npmjs.org/eslint/-/eslint-6.8.0.tgz", + "integrity": "sha512-K+Iayyo2LtyYhDSYwz5D5QdWw0hCacNzyq1Y821Xna2xSJj7cijoLLYmLxTQgcgZ9mC61nryMy9S7GRbYpI5Ig==", + "dev": true, + "requires": { + "@babel/code-frame": "^7.0.0", + "ajv": "^6.10.0", + "chalk": "^2.1.0", + "cross-spawn": "^6.0.5", + "debug": "^4.0.1", + "doctrine": "^3.0.0", + "eslint-scope": "^5.0.0", + "eslint-utils": "^1.4.3", + "eslint-visitor-keys": "^1.1.0", + "espree": "^6.1.2", + "esquery": "^1.0.1", + "esutils": "^2.0.2", + "file-entry-cache": "^5.0.1", + "functional-red-black-tree": "^1.0.1", + "glob-parent": "^5.0.0", + "globals": "^12.1.0", + "ignore": "^4.0.6", + "import-fresh": "^3.0.0", + "imurmurhash": "^0.1.4", + "inquirer": "^7.0.0", + "is-glob": "^4.0.0", + "js-yaml": "^3.13.1", + "json-stable-stringify-without-jsonify": "^1.0.1", + "levn": "^0.3.0", + "lodash": "^4.17.14", + "minimatch": "^3.0.4", + "mkdirp": "^0.5.1", + "natural-compare": "^1.4.0", + "optionator": "^0.8.3", + "progress": "^2.0.0", + "regexpp": "^2.0.1", + "semver": "^6.1.2", + "strip-ansi": "^5.2.0", + "strip-json-comments": "^3.0.1", + "table": "^5.2.3", + "text-table": "^0.2.0", + "v8-compile-cache": "^2.0.3" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "chalk": { + "version": "2.4.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", + "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.1", + "escape-string-regexp": "^1.0.5", + "supports-color": "^5.3.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "eslint-utils": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-1.4.3.tgz", + "integrity": "sha512-fbBN5W2xdY45KulGXmLHZ3c3FHfVYmKg0IrAKGOkT/464PQsx2UeIzfz1RmEci+KLm1bBaAzZAh8+/E+XAeZ8Q==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "has-flag": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", + "integrity": "sha1-tdRU3CGZriJWmfNGfloH87lVuv0=", + "dev": true + }, + "ignore": { + "version": "4.0.6", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-4.0.6.tgz", + "integrity": "sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg==", + "dev": true + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "regexpp": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-2.0.1.tgz", + "integrity": "sha512-lv0M6+TkDVniA3aD1Eg0DVpfU/booSu7Eev3TDO/mZKHBfVjgCGTV4t4buppESEYDtkArYFOxTJWv6S5C+iaNw==", + "dev": true + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + }, + "supports-color": { + "version": "5.5.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", + "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", + "dev": true, + "requires": { + "has-flag": "^3.0.0" + } + } + } + }, + "eslint-formatter-autolinkable-stylish": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/eslint-formatter-autolinkable-stylish/-/eslint-formatter-autolinkable-stylish-1.1.2.tgz", + "integrity": "sha512-vgBkDdzxRsr6/NnWqv7I3MhBBNNIMAs+aGgkIrR2NYtgI4qKbeFlajPEgWdSS5wdQDNGPdtkaxZEvYUnw6wsAg==", + "dev": true, + "requires": { + "chalk": "^3.0.0", + "plur": "^3.1.1" + }, + "dependencies": { + "chalk": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-3.0.0.tgz", + "integrity": "sha512-4D3B6Wf41KOYRFdszmDqMCGq5VV/uMAB273JILmO+3jAlh8X4qDtdtgCR3fxtbLEMzSx22QdhnDcJvu2u1fVwg==", + "dev": true, + "requires": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + } + } + } + }, + "eslint-import-resolver-node": { + "version": "0.3.4", + "resolved": "https://registry.npmjs.org/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.4.tgz", + "integrity": "sha512-ogtf+5AB/O+nM6DIeBUNr2fuT7ot9Qg/1harBfBtaP13ekEWFQEEMP94BCB7zaNW3gyY+8SHYF00rnqYwXKWOA==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "resolve": "^1.13.1" + }, + "dependencies": { + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + } + } + }, + "eslint-module-utils": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/eslint-module-utils/-/eslint-module-utils-2.6.0.tgz", + "integrity": "sha512-6j9xxegbqe8/kZY8cYpcp0xhbK0EgJlg3g9mib3/miLaExuuwc3n5UEfSnU6hWMbT0FAYVvDbL9RrRgpUeQIvA==", + "dev": true, + "requires": { + "debug": "^2.6.9", + "pkg-dir": "^2.0.0" + } + }, + "eslint-plugin-import": { + "version": "2.20.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.20.2.tgz", + "integrity": "sha512-FObidqpXrR8OnCh4iNsxy+WACztJLXAHBO5hK79T1Hc77PgQZkyDGA5Ag9xAvRpglvLNxhH/zSmZ70/pZ31dHg==", + "dev": true, + "requires": { + "array-includes": "^3.0.3", + "array.prototype.flat": "^1.2.1", + "contains-path": "^0.1.0", + "debug": "^2.6.9", + "doctrine": "1.5.0", + "eslint-import-resolver-node": "^0.3.2", + "eslint-module-utils": "^2.4.1", + "has": "^1.0.3", + "minimatch": "^3.0.4", + "object.values": "^1.1.0", + "read-pkg-up": "^2.0.0", + "resolve": "^1.12.0" + }, + "dependencies": { + "doctrine": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/doctrine/-/doctrine-1.5.0.tgz", + "integrity": "sha1-N53Ocw9hZvds76TmcHoVmwLFpvo=", + "dev": true, + "requires": { + "esutils": "^2.0.2", + "isarray": "^1.0.0" + } + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + } + } + }, + "eslint-plugin-jsdoc": { + "version": "22.1.0", + "resolved": "https://registry.npmjs.org/eslint-plugin-jsdoc/-/eslint-plugin-jsdoc-22.1.0.tgz", + "integrity": "sha512-54NdbICM7KrxsGUqQsev9aIMqPXyvyBx2218Qcm0TQ16P9CtBI+YY4hayJR6adrxlq4Ej0JLpgfUXWaQVFqmQg==", + "dev": true, + "requires": { + "comment-parser": "^0.7.2", + "debug": "^4.1.1", + "jsdoctypeparser": "^6.1.0", + "lodash": "^4.17.15", + "regextras": "^0.7.0", + "semver": "^6.3.0", + "spdx-expression-parse": "^3.0.0" + }, + "dependencies": { + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "semver": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.0.tgz", + "integrity": "sha512-b39TBaTSfV6yBrapU89p5fKekE2m/NwnDocOVruQFS1/veMgdzuPcnOM34M6CwxW8jH/lxEa5rBoDeUwu5HHTw==", + "dev": true + } + } + }, + "eslint-plugin-no-null": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/eslint-plugin-no-null/-/eslint-plugin-no-null-1.0.2.tgz", + "integrity": "sha1-EjaoEjkTkKGHetQAfCbnRTQclR8=", + "dev": true + }, + "eslint-scope": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.0.tgz", + "integrity": "sha512-iiGRvtxWqgtx5m8EyQUJihBloE4EnYeGE/bz1wSPwJE6tZuJUtHlhqDM4Xj2ukE8Dyy1+HCZ4hE0fzIVMzb58w==", + "dev": true, + "requires": { + "esrecurse": "^4.1.0", + "estraverse": "^4.1.1" + } + }, + "eslint-utils": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/eslint-utils/-/eslint-utils-2.1.0.tgz", + "integrity": "sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg==", + "dev": true, + "requires": { + "eslint-visitor-keys": "^1.1.0" + } + }, + "eslint-visitor-keys": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz", + "integrity": "sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ==", + "dev": true + }, + "espree": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/espree/-/espree-6.2.1.tgz", + "integrity": "sha512-ysCxRQY3WaXJz9tdbWOwuWr5Y/XrPTGX9Kiz3yoUXwW0VZ4w30HTkQLaGx/+ttFjF8i+ACbArnB4ce68a9m5hw==", + "dev": true, + "requires": { + "acorn": "^7.1.1", + "acorn-jsx": "^5.2.0", + "eslint-visitor-keys": "^1.1.0" + } + }, + "esprima": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-4.0.1.tgz", + "integrity": "sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A==", + "dev": true + }, + "esquery": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/esquery/-/esquery-1.3.1.tgz", + "integrity": "sha512-olpvt9QG0vniUBZspVRN6lwB7hOZoTRtT+jzR+tS4ffYx2mzbw+z0XCOk44aaLYKApNX5nMm+E+P6o25ip/DHQ==", + "dev": true, + "requires": { + "estraverse": "^5.1.0" + }, + "dependencies": { + "estraverse": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-5.2.0.tgz", + "integrity": "sha512-BxbNGGNm0RyRYvUdHpIwv9IWzeM9XClbOxwoATuFdOE7ZE6wHL+HQ5T8hoPM+zHvmKzzsEqhgy0GrQ5X13afiQ==", + "dev": true + } + } + }, + "esrecurse": { + "version": "4.2.1", + "resolved": "https://registry.npmjs.org/esrecurse/-/esrecurse-4.2.1.tgz", + "integrity": "sha512-64RBB++fIOAXPw3P9cy89qfMlvZEXZkqqJkjqqXIvzP5ezRZjW+lPWjw35UX/3EhUPFYbg5ER4JYgDw4007/DQ==", + "dev": true, + "requires": { + "estraverse": "^4.1.0" + } + }, + "estraverse": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz", + "integrity": "sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw==", + "dev": true + }, + "esutils": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/esutils/-/esutils-2.0.3.tgz", + "integrity": "sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==", + "dev": true + }, + "event-emitter": { + "version": "0.3.5", + "resolved": "https://registry.npmjs.org/event-emitter/-/event-emitter-0.3.5.tgz", + "integrity": "sha1-34xp7vFkeSPHFXuc6DhAYQsCzDk=", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "~0.10.14" + } + }, + "events": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/events/-/events-2.1.0.tgz", + "integrity": "sha512-3Zmiobend8P9DjmKAty0Era4jV8oJ0yGYe2nJJAxgymF9+N8F2m0hhZiMoWtcfepExzNKZumFU3ksdQbInGWCg==", + "dev": true + }, + "evp_bytestokey": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/evp_bytestokey/-/evp_bytestokey-1.0.3.tgz", + "integrity": "sha512-/f2Go4TognH/KvCISP7OUsHn85hT9nUkxxA9BEWxFn+Oj9o8ZNLm/40hdlgSLyuOimsrTKLUMEorQexp/aPQeA==", + "dev": true, + "requires": { + "md5.js": "^1.3.4", + "safe-buffer": "^5.1.1" + } + }, + "execa": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/execa/-/execa-1.0.0.tgz", + "integrity": "sha512-adbxcyWV46qiHyvSp50TKt05tB4tK3HcmF7/nxfAdhnox83seTDbwnaqKO4sXRy7roHAIFqJP/Rw/AuEbX61LA==", + "dev": true, + "requires": { + "cross-spawn": "^6.0.0", + "get-stream": "^4.0.0", + "is-stream": "^1.1.0", + "npm-run-path": "^2.0.0", + "p-finally": "^1.0.0", + "signal-exit": "^3.0.0", + "strip-eof": "^1.0.0" + } + }, + "expand-brackets": { + "version": "2.1.4", + "resolved": "https://registry.npmjs.org/expand-brackets/-/expand-brackets-2.1.4.tgz", + "integrity": "sha1-t3c14xXOMPa27/D4OwQVGiJEliI=", + "dev": true, + "requires": { + "debug": "^2.3.3", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "posix-character-classes": "^0.1.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "expand-tilde": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/expand-tilde/-/expand-tilde-2.0.2.tgz", + "integrity": "sha1-l+gBqgUt8CRU3kawK/YhZCzchQI=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "ext": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/ext/-/ext-1.4.0.tgz", + "integrity": "sha512-Key5NIsUxdqKg3vIsdw9dSuXpPCQ297y6wBjL30edxwPgt2E44WcWBZey/ZvUc6sERLTxKdyCu4gZFmUbk1Q7A==", + "dev": true, + "requires": { + "type": "^2.0.0" + }, + "dependencies": { + "type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/type/-/type-2.0.0.tgz", + "integrity": "sha512-KBt58xCHry4Cejnc2ISQAF7QY+ORngsWfxezO68+12hKV6lQY8P/psIkcbjeHWn7MqcgciWJyCCevFMJdIXpow==", + "dev": true + } + } + }, + "extend": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend/-/extend-3.0.2.tgz", + "integrity": "sha512-fjquC59cD7CyW6urNXK0FBufkZcoiGG80wTuPujX590cB5Ttln20E2UB4S/WARVqhXffZl2LNgS+gQdPIIim/g==", + "dev": true + }, + "extend-shallow": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-3.0.2.tgz", + "integrity": "sha1-Jqcarwc7OfshJxcnRhMcJwQCjbg=", + "dev": true, + "requires": { + "assign-symbols": "^1.0.0", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + } + } + }, + "external-editor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/external-editor/-/external-editor-3.1.0.tgz", + "integrity": "sha512-hMQ4CX1p1izmuLYyZqLMO/qGNw10wSv9QDCPfzXfyFrOaCSSoRfqE1Kf1s5an66J5JZC62NewG+mK49jOCtQew==", + "dev": true, + "requires": { + "chardet": "^0.7.0", + "iconv-lite": "^0.4.24", + "tmp": "^0.0.33" + } + }, + "extglob": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/extglob/-/extglob-2.0.4.tgz", + "integrity": "sha512-Nmb6QXkELsuBr24CJSkilo6UHHgbekK5UiZgfE6UHD3Eb27YC6oD+bhcT+tJ6cl8dmsgdQxnWlcry8ksBIBLpw==", + "dev": true, + "requires": { + "array-unique": "^0.3.2", + "define-property": "^1.0.0", + "expand-brackets": "^2.1.4", + "extend-shallow": "^2.0.1", + "fragment-cache": "^0.2.1", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "fancy-log": { + "version": "1.3.3", + "resolved": "https://registry.npmjs.org/fancy-log/-/fancy-log-1.3.3.tgz", + "integrity": "sha512-k9oEhlyc0FrVh25qYuSELjr8oxsCoc4/LEZfg2iJJrfEk/tZL9bCoJE47gqAvI2m/AUjluCS4+3I0eTx8n3AEw==", + "dev": true, + "requires": { + "ansi-gray": "^0.1.1", + "color-support": "^1.1.3", + "parse-node-version": "^1.0.0", + "time-stamp": "^1.0.0" + } + }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==", + "dev": true + }, + "fast-glob": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.4.tgz", + "integrity": "sha512-kr/Oo6PX51265qeuCYsyGypiO5uJFgBS0jksyG7FUeCyQzNwYnzrNIMR1NXfkZXsMYXYLRAHgISHBz8gQcxKHQ==", + "dev": true, + "requires": { + "@nodelib/fs.stat": "^2.0.2", + "@nodelib/fs.walk": "^1.2.3", + "glob-parent": "^5.1.0", + "merge2": "^1.3.0", + "micromatch": "^4.0.2", + "picomatch": "^2.2.1" + }, + "dependencies": { + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "micromatch": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-4.0.2.tgz", + "integrity": "sha512-y7FpHSbMUMoyPbYUSzO6PaZ6FyRnQOpHuKwbo1G+Knck95XVU4QAiKdGEnj5wwoS7PlOgthX/09u5iFJ+aYf5Q==", + "dev": true, + "requires": { + "braces": "^3.0.1", + "picomatch": "^2.0.5" + } + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + } + } + }, + "fast-json-stable-stringify": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz", + "integrity": "sha512-lhd/wF+Lk98HZoTCtlVraHtfh5XYijIjalXck7saUtuanSDyLMxnHhSXEDJqHxD7msR8D0uCmqlkwjCV8xvwHw==", + "dev": true + }, + "fast-levenshtein": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-2.0.6.tgz", + "integrity": "sha1-PYpcZog6FqMMqGQ+hR8Zuqd5eRc=", + "dev": true + }, + "fast-safe-stringify": { + "version": "2.0.7", + "resolved": "https://registry.npmjs.org/fast-safe-stringify/-/fast-safe-stringify-2.0.7.tgz", + "integrity": "sha512-Utm6CdzT+6xsDk2m8S6uL8VHxNwI6Jub+e9NYTcAms28T84pTa25GJQV9j0CY0N1rM8hK4x6grpF2BQf+2qwVA==", + "dev": true + }, + "fastq": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.8.0.tgz", + "integrity": "sha512-SMIZoZdLh/fgofivvIkmknUXyPnvxRE3DhtZ5Me3Mrsk5gyPL42F0xr51TdRXskBxHfMp+07bcYzfsYEsSQA9Q==", + "dev": true, + "requires": { + "reusify": "^1.0.4" + } + }, + "figures": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/figures/-/figures-3.2.0.tgz", + "integrity": "sha512-yaduQFRKLXYOGgEn6AZau90j3ggSOyiqXU0F9JZfeXYhNa+Jk4X+s45A2zg5jns87GAFa34BBm2kXw4XpNcbdg==", + "dev": true, + "requires": { + "escape-string-regexp": "^1.0.5" + } + }, + "file-entry-cache": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/file-entry-cache/-/file-entry-cache-5.0.1.tgz", + "integrity": "sha512-bCg29ictuBaKUwwArK4ouCaqDgLZcysCFLmM/Yn/FDoqndh/9vNuQfXRDvTuXKLxfD/JtZQGKFT8MGcJBK644g==", + "dev": true, + "requires": { + "flat-cache": "^2.0.1" + } + }, + "file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "optional": true + }, + "fill-range": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-4.0.0.tgz", + "integrity": "sha1-1USBHUKPmOsGpj3EAtJAPDKMOPc=", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-number": "^3.0.0", + "repeat-string": "^1.6.1", + "to-regex-range": "^2.1.0" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "find-up": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-2.1.0.tgz", + "integrity": "sha1-RdG35QbHF93UgndaK3eSCjwMV6c=", + "dev": true, + "requires": { + "locate-path": "^2.0.0" + } + }, + "findup-sync": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-3.0.0.tgz", + "integrity": "sha512-YbffarhcicEhOrm4CtrwdKBdCuz576RLdhJDsIfvNtxUuhdRet1qZcsMjqbePtAseKdAnDyM/IyXbu7PRPRLYg==", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^4.0.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "fined": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/fined/-/fined-1.2.0.tgz", + "integrity": "sha512-ZYDqPLGxDkDhDZBjZBb+oD1+j0rA4E0pXY50eplAAOPg2N/gUBSSk5IM1/QhPfyVo19lJ+CvXpqfvk+b2p/8Ng==", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "is-plain-object": "^2.0.3", + "object.defaults": "^1.1.0", + "object.pick": "^1.2.0", + "parse-filepath": "^1.0.1" + }, + "dependencies": { + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + } + } + }, + "flagged-respawn": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/flagged-respawn/-/flagged-respawn-1.0.1.tgz", + "integrity": "sha512-lNaHNVymajmk0OJMBn8fVUAU1BtDeKIqKoVhk4xAALB57aALg6b4W0MfJ/cUE0g9YBXy5XhSlPIpYIJ7HaY/3Q==", + "dev": true + }, + "flat": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/flat/-/flat-4.1.0.tgz", + "integrity": "sha512-Px/TiLIznH7gEDlPXcUD4KnBusa6kR6ayRUVcnEAbreRIuhkqow/mun59BuRXwoYk7ZQOLW1ZM05ilIvK38hFw==", + "dev": true, + "requires": { + "is-buffer": "~2.0.3" + }, + "dependencies": { + "is-buffer": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-2.0.4.tgz", + "integrity": "sha512-Kq1rokWXOPXWuaMAqZiJW4XxsmD9zGx9q4aePabbn3qCRGedtH7Cm+zV8WETitMfu1wdh+Rvd6w5egwSngUX2A==", + "dev": true + } + } + }, + "flat-cache": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-2.0.1.tgz", + "integrity": "sha512-LoQe6yDuUMDzQAEH8sgmh4Md6oZnc/7PjtwjNFSzveXqSHt6ka9fPBuso7IGf9Rz4uqnSnWiFH2B/zj24a5ReA==", + "dev": true, + "requires": { + "flatted": "^2.0.0", + "rimraf": "2.6.3", + "write": "1.0.3" + }, + "dependencies": { + "rimraf": { + "version": "2.6.3", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-2.6.3.tgz", + "integrity": "sha512-mwqeW5XsA2qAejG46gYdENaxXjx9onRNCfn7L0duuP4hCuTIi/QO7PDK07KJfp1d+izWPrzEJDcSqBa0OZQriA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + } + } + }, + "flatted": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/flatted/-/flatted-2.0.2.tgz", + "integrity": "sha512-r5wGx7YeOwNWNlCA0wQ86zKyDLMQr+/RB8xy74M4hTphfmjlijTSSXGuH8rnvKZnfT9i+75zmd8jcKdMR4O6jA==", + "dev": true + }, + "flush-write-stream": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/flush-write-stream/-/flush-write-stream-1.1.1.tgz", + "integrity": "sha512-3Z4XhFZ3992uIq0XOqb9AreonueSYphE6oYbpt5+3u06JWklbsPkNv3ZKkP9Bz/r+1MWCaMoSQ28P85+1Yc77w==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "readable-stream": "^2.3.6" + } + }, + "for-in": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", + "integrity": "sha1-gQaNKVqBQuwKxybG4iAMMPttXoA=", + "dev": true + }, + "for-own": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/for-own/-/for-own-1.0.0.tgz", + "integrity": "sha1-xjMy9BXO3EsE2/5wz4NklMU8tEs=", + "dev": true, + "requires": { + "for-in": "^1.0.1" + } + }, + "form-data": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/form-data/-/form-data-3.0.0.tgz", + "integrity": "sha512-CKMFDglpbMi6PyN+brwB9Q/GOw0eAnsrEZDgcsH5Krhz5Od/haKHAX0NmQfha2zPPz0JpWzA7GJHGSnvCRLWsg==", + "dev": true, + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.8", + "mime-types": "^2.1.12" + } + }, + "fragment-cache": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/fragment-cache/-/fragment-cache-0.2.1.tgz", + "integrity": "sha1-QpD60n8T6Jvn8zeZxrxaCr//DRk=", + "dev": true, + "requires": { + "map-cache": "^0.2.2" + } + }, + "fs-extra": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/fs-extra/-/fs-extra-9.0.1.tgz", + "integrity": "sha512-h2iAoN838FqAFJY2/qVpzFXy+EBxfVE220PalAqQLDVsFOHLJrZvut5puAbCdNv6WJk+B8ihI+k0c7JK5erwqQ==", + "dev": true, + "requires": { + "at-least-node": "^1.0.0", + "graceful-fs": "^4.2.0", + "jsonfile": "^6.0.1", + "universalify": "^1.0.0" + } + }, + "fs-mkdirp-stream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-mkdirp-stream/-/fs-mkdirp-stream-1.0.0.tgz", + "integrity": "sha1-C3gV/DIBxqaeFNuYzgmMFpNSWes=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "through2": "^2.0.3" + }, + "dependencies": { + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "fs.realpath": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", + "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", + "dev": true + }, + "fsevents": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-1.2.13.tgz", + "integrity": "sha512-oWb1Z6mkHIskLzEJ/XWX0srkpkTQ7vaopMQkyaEIoq0fmtFVxOthb8cCxeT+p3ynTdkk/RZwbgG4brR5BeWECw==", + "dev": true, + "optional": true, + "requires": { + "bindings": "^1.5.0", + "nan": "^2.12.1" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", + "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", + "dev": true + }, + "functional-red-black-tree": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz", + "integrity": "sha1-GwqzvVU7Kg1jmdKcDj6gslIHgyc=", + "dev": true + }, + "get-assigned-identifiers": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/get-assigned-identifiers/-/get-assigned-identifiers-1.2.0.tgz", + "integrity": "sha512-mBBwmeGTrxEMO4pMaaf/uUEFHnYtwr8FTe8Y/mer4rcV/bye0qGm6pw1bGZFGStxC5O76c5ZAVBGnqHmOaJpdQ==", + "dev": true + }, + "get-caller-file": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-1.0.3.tgz", + "integrity": "sha512-3t6rVToeoZfYSGd8YoLFR2DJkiQrIiUrGcjvFX2mDw3bn6k2OtwHN0TNCLbBO+w8qTvimhDkv+LSscbJY1vE6w==", + "dev": true + }, + "get-func-name": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/get-func-name/-/get-func-name-2.0.0.tgz", + "integrity": "sha1-6td0q+5y4gQJQzoGY2YCPdaIekE=", + "dev": true + }, + "get-stream": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/get-stream/-/get-stream-4.1.0.tgz", + "integrity": "sha512-GMat4EJ5161kIy2HevLlr4luNjBgvmj413KaQA7jt4V8B4RDsfpHk7WQ9GVqfYyyx8OS/L66Kox+rJRNklLK7w==", + "dev": true, + "requires": { + "pump": "^3.0.0" + }, + "dependencies": { + "pump": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", + "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + } + } + }, + "get-value": { + "version": "2.0.6", + "resolved": "https://registry.npmjs.org/get-value/-/get-value-2.0.6.tgz", + "integrity": "sha1-3BXKHGcjh8p2vTesCjlbogQqLCg=", + "dev": true + }, + "glob": { + "version": "7.1.6", + "resolved": "https://registry.npmjs.org/glob/-/glob-7.1.6.tgz", + "integrity": "sha512-LwaxwyZ72Lk7vZINtNNrywX0ZuLyStrdDtabefZKAY5ZGJhVtgdznluResxNmPitE0SAO+O26sWTHeKSI2wMBA==", + "dev": true, + "requires": { + "fs.realpath": "^1.0.0", + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "^3.0.4", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "glob-parent": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-3.1.0.tgz", + "integrity": "sha1-nmr2KZ2NO9K9QEMIMr0RPfkGxa4=", + "dev": true, + "requires": { + "is-glob": "^3.1.0", + "path-dirname": "^1.0.0" + }, + "dependencies": { + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + } + } + }, + "glob-stream": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/glob-stream/-/glob-stream-6.1.0.tgz", + "integrity": "sha1-cEXJlBOz65SIjYOrRtC0BMx73eQ=", + "dev": true, + "requires": { + "extend": "^3.0.0", + "glob": "^7.1.1", + "glob-parent": "^3.1.0", + "is-negated-glob": "^1.0.0", + "ordered-read-streams": "^1.0.0", + "pumpify": "^1.3.5", + "readable-stream": "^2.1.5", + "remove-trailing-separator": "^1.0.1", + "to-absolute-glob": "^2.0.0", + "unique-stream": "^2.0.2" + } + }, + "glob-watcher": { + "version": "5.0.5", + "resolved": "https://registry.npmjs.org/glob-watcher/-/glob-watcher-5.0.5.tgz", + "integrity": "sha512-zOZgGGEHPklZNjZQaZ9f41i7F2YwE+tS5ZHrDhbBCk3stwahn5vQxnFmBJZHoYdusR6R1bLSXeGUy/BhctwKzw==", + "dev": true, + "requires": { + "anymatch": "^2.0.0", + "async-done": "^1.2.0", + "chokidar": "^2.0.0", + "is-negated-glob": "^1.0.0", + "just-debounce": "^1.0.0", + "normalize-path": "^3.0.0", + "object.defaults": "^1.1.0" + } + }, + "global-modules": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/global-modules/-/global-modules-1.0.0.tgz", + "integrity": "sha512-sKzpEkf11GpOFuw0Zzjzmt4B4UZwjOcG757PPvrfhxcLFbq0wpsgpOqxpxtxFiCG4DtG93M6XRVbF2oGdev7bg==", + "dev": true, + "requires": { + "global-prefix": "^1.0.1", + "is-windows": "^1.0.1", + "resolve-dir": "^1.0.0" + } + }, + "global-prefix": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/global-prefix/-/global-prefix-1.0.2.tgz", + "integrity": "sha1-2/dDxsFJklk8ZVVoy2btMsASLr4=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.2", + "homedir-polyfill": "^1.0.1", + "ini": "^1.3.4", + "is-windows": "^1.0.1", + "which": "^1.2.14" + } + }, + "globals": { + "version": "12.4.0", + "resolved": "https://registry.npmjs.org/globals/-/globals-12.4.0.tgz", + "integrity": "sha512-BWICuzzDvDoH54NHKCseDanAhE3CeDorgDL5MT6LMXXj2WCnd9UC2szdk4AWLfjdgNBCXLUanXYcpBBKOSWGwg==", + "dev": true, + "requires": { + "type-fest": "^0.8.1" + } + }, + "globby": { + "version": "10.0.2", + "resolved": "https://registry.npmjs.org/globby/-/globby-10.0.2.tgz", + "integrity": "sha512-7dUi7RvCoT/xast/o/dLN53oqND4yk0nsHkhRgn9w65C4PofCLOoJ39iSOg+qVDdWQPIEj+eszMHQ+aLVwwQSg==", + "dev": true, + "requires": { + "@types/glob": "^7.1.1", + "array-union": "^2.1.0", + "dir-glob": "^3.0.1", + "fast-glob": "^3.0.3", + "glob": "^7.1.3", + "ignore": "^5.1.1", + "merge2": "^1.2.3", + "slash": "^3.0.0" + } + }, + "glogg": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/glogg/-/glogg-1.0.2.tgz", + "integrity": "sha512-5mwUoSuBk44Y4EshyiqcH95ZntbDdTQqA3QYSrxmzj28Ai0vXBGMH1ApSANH14j2sIRtqCEyg6PfsuP7ElOEDA==", + "dev": true, + "requires": { + "sparkles": "^1.0.0" + } + }, + "graceful-fs": { + "version": "4.2.4", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.4.tgz", + "integrity": "sha512-WjKPNJF79dtJAVniUlGGWHYGz2jWxT6VhN/4m1NdkbZ2nOsEF+cI1Edgql5zCRhs/VsQYRvrXctxktVXZUkixw==", + "dev": true + }, + "growl": { + "version": "1.10.5", + "resolved": "https://registry.npmjs.org/growl/-/growl-1.10.5.tgz", + "integrity": "sha512-qBr4OuELkhPenW6goKVXiv47US3clb3/IbuWF9KNKEijAy9oeHxU9IgzjvJhHkUzhaj7rOUD7+YGWqUjLp5oSA==", + "dev": true + }, + "gulp": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/gulp/-/gulp-4.0.2.tgz", + "integrity": "sha512-dvEs27SCZt2ibF29xYgmnwwCYZxdxhQ/+LFWlbAW8y7jt68L/65402Lz3+CKy0Ov4rOs+NERmDq7YlZaDqUIfA==", + "dev": true, + "requires": { + "glob-watcher": "^5.0.3", + "gulp-cli": "^2.2.0", + "undertaker": "^1.2.1", + "vinyl-fs": "^3.0.0" + }, + "dependencies": { + "gulp-cli": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/gulp-cli/-/gulp-cli-2.3.0.tgz", + "integrity": "sha512-zzGBl5fHo0EKSXsHzjspp3y5CONegCm8ErO5Qh0UzFzk2y4tMvzLWhoDokADbarfZRL2pGpRp7yt6gfJX4ph7A==", + "dev": true, + "requires": { + "ansi-colors": "^1.0.1", + "archy": "^1.0.0", + "array-sort": "^1.0.0", + "color-support": "^1.1.3", + "concat-stream": "^1.6.0", + "copy-props": "^2.0.1", + "fancy-log": "^1.3.2", + "gulplog": "^1.0.0", + "interpret": "^1.4.0", + "isobject": "^3.0.1", + "liftoff": "^3.1.0", + "matchdep": "^2.0.0", + "mute-stdout": "^1.0.0", + "pretty-hrtime": "^1.0.0", + "replace-homedir": "^1.0.0", + "semver-greatest-satisfied-range": "^1.1.0", + "v8flags": "^3.2.0", + "yargs": "^7.1.0" + } + } + } + }, + "gulp-concat": { + "version": "2.6.1", + "resolved": "https://registry.npmjs.org/gulp-concat/-/gulp-concat-2.6.1.tgz", + "integrity": "sha1-Yz0WyV2IUEYorQJmVmPO5aR5M1M=", + "dev": true, + "requires": { + "concat-with-sourcemaps": "^1.0.0", + "through2": "^2.0.0", + "vinyl": "^2.0.0" + }, + "dependencies": { + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "gulp-insert": { + "version": "0.5.0", + "resolved": "https://registry.npmjs.org/gulp-insert/-/gulp-insert-0.5.0.tgz", + "integrity": "sha1-MjE/E+SiPPWsylzl8MCAkjx3hgI=", + "dev": true, + "requires": { + "readable-stream": "^1.0.26-4", + "streamqueue": "0.0.6" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "gulp-newer": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/gulp-newer/-/gulp-newer-1.4.0.tgz", + "integrity": "sha512-h79fGO55S/P9eAADbLAP9aTtVYpLSR1ONj08VPaSdVVNVYhTS8p1CO1TW7kEMu+hC+sytmCqcUr5LesvZEtDoQ==", + "dev": true, + "requires": { + "glob": "^7.0.3", + "kew": "^0.7.0", + "plugin-error": "^0.1.2" + }, + "dependencies": { + "arr-diff": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/arr-diff/-/arr-diff-1.1.0.tgz", + "integrity": "sha1-aHwydYFjWI/vfeezb6vklesaOZo=", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "array-slice": "^0.2.3" + } + }, + "arr-union": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/arr-union/-/arr-union-2.1.0.tgz", + "integrity": "sha1-IPnqtexw9cfSFbEHexw5Fh0pLH0=", + "dev": true + }, + "array-slice": { + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/array-slice/-/array-slice-0.2.3.tgz", + "integrity": "sha1-3Tz7gO15c6dRF82sabC5nshhhvU=", + "dev": true + }, + "extend-shallow": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-1.1.4.tgz", + "integrity": "sha1-Gda/lN/AnXa6cR85uHLSH/TdkHE=", + "dev": true, + "requires": { + "kind-of": "^1.1.0" + } + }, + "kind-of": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-1.1.0.tgz", + "integrity": "sha1-FAo9LUGjbS78+pN3tiwk+ElaXEQ=", + "dev": true + }, + "plugin-error": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-0.1.2.tgz", + "integrity": "sha1-O5uzM1zPAPQl4HQ34ZJ2ln2kes4=", + "dev": true, + "requires": { + "ansi-cyan": "^0.1.1", + "ansi-red": "^0.1.1", + "arr-diff": "^1.0.1", + "arr-union": "^2.0.1", + "extend-shallow": "^1.1.2" + } + } + } + }, + "gulp-rename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/gulp-rename/-/gulp-rename-2.0.0.tgz", + "integrity": "sha512-97Vba4KBzbYmR5VBs9mWmK+HwIf5mj+/zioxfZhOKeXtx5ZjBk57KFlePf5nxq9QsTtFl0ejnHE3zTC9MHXqyQ==", + "dev": true + }, + "gulp-sourcemaps": { + "version": "2.6.5", + "resolved": "https://registry.npmjs.org/gulp-sourcemaps/-/gulp-sourcemaps-2.6.5.tgz", + "integrity": "sha512-SYLBRzPTew8T5Suh2U8jCSDKY+4NARua4aqjj8HOysBh2tSgT9u4jc1FYirAdPx1akUxxDeK++fqw6Jg0LkQRg==", + "dev": true, + "requires": { + "@gulp-sourcemaps/identity-map": "1.X", + "@gulp-sourcemaps/map-sources": "1.X", + "acorn": "5.X", + "convert-source-map": "1.X", + "css": "2.X", + "debug-fabulous": "1.X", + "detect-newline": "2.X", + "graceful-fs": "4.X", + "source-map": "~0.6.0", + "strip-bom-string": "1.X", + "through2": "2.X" + }, + "dependencies": { + "acorn": { + "version": "5.7.4", + "resolved": "https://registry.npmjs.org/acorn/-/acorn-5.7.4.tgz", + "integrity": "sha512-1D++VG7BhrtvQpNbBzovKNc1FLGGEE/oGe7b9xJm/RFHMBeUaUGpluV9RLjZa47YFdPcDAenEYuq9pQPcMdLJg==", + "dev": true + }, + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "gulplog": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/gulplog/-/gulplog-1.0.0.tgz", + "integrity": "sha1-4oxNRdBey77YGDY86PnFkmIp/+U=", + "dev": true, + "requires": { + "glogg": "^1.0.0" + } + }, + "handlebars": { + "version": "4.7.6", + "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.6.tgz", + "integrity": "sha512-1f2BACcBfiwAfStCKZNrUCgqNZkGsAT7UM3kkYtXuLo0KnaVfjKOyf7PRzB6++aK9STyT1Pd2ZCPe3EGOXleXA==", + "dev": true, + "requires": { + "minimist": "^1.2.5", + "neo-async": "^2.6.0", + "source-map": "^0.6.1", + "uglify-js": "^3.1.4", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "has": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", + "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", + "dev": true, + "requires": { + "function-bind": "^1.1.1" + } + }, + "has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true + }, + "has-symbols": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.1.tgz", + "integrity": "sha512-PLcsoqu++dmEIZB+6totNFKq/7Do+Z0u4oT0zKOJNl3lYK6vGwwu2hjHs+68OEZbTjiUE9bgOABXbP/GvrS0Kg==", + "dev": true + }, + "has-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-1.0.0.tgz", + "integrity": "sha1-GLKB2lhbHFxR3vJMkw7SmgvmsXc=", + "dev": true, + "requires": { + "get-value": "^2.0.6", + "has-values": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "has-values": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-1.0.0.tgz", + "integrity": "sha1-lbC2P+whRmGab+V/51Yo1aOe/k8=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "kind-of": "^4.0.0" + }, + "dependencies": { + "kind-of": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-4.0.0.tgz", + "integrity": "sha1-IIE989cSkosgc3hpGkUGb65y3Vc=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "hash-base": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/hash-base/-/hash-base-3.1.0.tgz", + "integrity": "sha512-1nmYp/rhMDiE7AYkDw+lLwlAzz0AntGIe51F3RfFfEqyQ3feY2eI/NcwC6umIQVOASPMsWJLJScWKSSvzL9IVA==", + "dev": true, + "requires": { + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "safe-buffer": "^5.2.0" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + }, + "safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true + } + } + }, + "hash.js": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/hash.js/-/hash.js-1.1.7.tgz", + "integrity": "sha512-taOaskGt4z4SOANNseOviYDvjEJinIkRgmp7LbKP2YTTmVxWBl87s/uzK9r+44BclBSp2X7K1hqeNfz9JbBeXA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "minimalistic-assert": "^1.0.1" + } + }, + "he": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz", + "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==", + "dev": true + }, + "hmac-drbg": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/hmac-drbg/-/hmac-drbg-1.0.1.tgz", + "integrity": "sha1-0nRXAQJabHdabFRXk+1QL8DGSaE=", + "dev": true, + "requires": { + "hash.js": "^1.0.3", + "minimalistic-assert": "^1.0.0", + "minimalistic-crypto-utils": "^1.0.1" + } + }, + "homedir-polyfill": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/homedir-polyfill/-/homedir-polyfill-1.0.3.tgz", + "integrity": "sha512-eSmmWE5bZTK2Nou4g0AI3zZ9rswp7GRKoKXS1BLUkvPviOqs4YTN1djQIqrXy9k5gEtdLPy86JjRwsNM9tnDcA==", + "dev": true, + "requires": { + "parse-passwd": "^1.0.0" + } + }, + "hosted-git-info": { + "version": "2.8.8", + "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-2.8.8.tgz", + "integrity": "sha512-f/wzC2QaWBs7t9IYqB4T3sR1xviIViXJRJTWBlx2Gf3g0Xi5vI7Yy4koXQ1c9OYDGHN9sBy1DQ2AB8fqZBWhUg==", + "dev": true + }, + "htmlescape": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/htmlescape/-/htmlescape-1.1.1.tgz", + "integrity": "sha1-OgPtwiFLyjtmQko+eVk0lQnLA1E=", + "dev": true + }, + "https-browserify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/https-browserify/-/https-browserify-1.0.0.tgz", + "integrity": "sha1-7AbBDgo0wPL68Zn3/X/Hj//QPHM=", + "dev": true + }, + "iconv-lite": { + "version": "0.4.24", + "resolved": "https://registry.npmjs.org/iconv-lite/-/iconv-lite-0.4.24.tgz", + "integrity": "sha512-v3MXnZAcvnywkTUEZomIActle7RXXeedOR31wwl7VlyoXO4Qi9arvSenNQWne1TcRwhCL1HwLI21bEqdpj8/rA==", + "dev": true, + "requires": { + "safer-buffer": ">= 2.1.2 < 3" + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.1.13.tgz", + "integrity": "sha512-4vf7I2LYV/HaWerSo3XmlMkp5eZ83i+/CDluXi/IGTs/O1sejBNhTtnxzmRZfvOUqj7lZjqHkeTvpgSFDlWZTg==", + "dev": true + }, + "ignore": { + "version": "5.1.8", + "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.1.8.tgz", + "integrity": "sha512-BMpfD7PpiETpBl/A6S498BaIJ6Y/ABT93ETbby2fP00v4EbvPBXWEoaR1UBPKs3iR53pJY7EtZk5KACI57i1Uw==", + "dev": true + }, + "import-fresh": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/import-fresh/-/import-fresh-3.2.1.tgz", + "integrity": "sha512-6e1q1cnWP2RXD9/keSkxHScg508CdXqXWgWBaETNhyuBFz+kUZlKboh+ISK+bU++DmbHimVBrOz/zzPe0sZ3sQ==", + "dev": true, + "requires": { + "parent-module": "^1.0.0", + "resolve-from": "^4.0.0" + } + }, + "imurmurhash": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/imurmurhash/-/imurmurhash-0.1.4.tgz", + "integrity": "sha1-khi5srkoojixPcT7a21XbyMUU+o=", + "dev": true + }, + "indent-string": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/indent-string/-/indent-string-4.0.0.tgz", + "integrity": "sha512-EdDDZu4A2OyIK7Lr/2zG+w5jmbuk1DVBnEwREQvBzspBJkCEbRa8GxU1lghYcaGJCnRWibjDXlq779X1/y5xwg==", + "dev": true + }, + "inflight": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", + "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", + "dev": true, + "requires": { + "once": "^1.3.0", + "wrappy": "1" + } + }, + "inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true + }, + "ini": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.5.tgz", + "integrity": "sha512-RZY5huIKCMRWDUqZlEi72f/lmXKMvuszcMBduliQ3nnWbx9X/ZBQO7DijMEYS9EhHBb2qacRUMtC7svLwe0lcw==", + "dev": true + }, + "inline-source-map": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/inline-source-map/-/inline-source-map-0.6.2.tgz", + "integrity": "sha1-+Tk0ccGKedFyT4Y/o4tYY3Ct4qU=", + "dev": true, + "requires": { + "source-map": "~0.5.3" + } + }, + "inquirer": { + "version": "7.3.3", + "resolved": "https://registry.npmjs.org/inquirer/-/inquirer-7.3.3.tgz", + "integrity": "sha512-JG3eIAj5V9CwcGvuOmoo6LB9kbAYT8HXffUl6memuszlwDC/qvFAJw49XJ5NROSFNPxp3iQg1GqkFhaY/CR0IA==", + "dev": true, + "requires": { + "ansi-escapes": "^4.2.1", + "chalk": "^4.1.0", + "cli-cursor": "^3.1.0", + "cli-width": "^3.0.0", + "external-editor": "^3.0.3", + "figures": "^3.0.0", + "lodash": "^4.17.19", + "mute-stream": "0.0.8", + "run-async": "^2.4.0", + "rxjs": "^6.6.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0", + "through": "^2.3.6" + }, + "dependencies": { + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "insert-module-globals": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/insert-module-globals/-/insert-module-globals-7.2.0.tgz", + "integrity": "sha512-VE6NlW+WGn2/AeOMd496AHFYmE7eLKkUY6Ty31k4og5vmA3Fjuwe9v6ifH6Xx/Hz27QvdoMoviw1/pqWRB09Sw==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "acorn-node": "^1.5.2", + "combine-source-map": "^0.8.0", + "concat-stream": "^1.6.1", + "is-buffer": "^1.1.0", + "path-is-absolute": "^1.0.1", + "process": "~0.11.0", + "through2": "^2.0.0", + "undeclared-identifiers": "^1.1.2", + "xtend": "^4.0.0" + }, + "dependencies": { + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "interpret": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/interpret/-/interpret-1.4.0.tgz", + "integrity": "sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==", + "dev": true + }, + "invert-kv": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-1.0.0.tgz", + "integrity": "sha1-EEqOSqym09jNFXqO+L+rLXo//bY=", + "dev": true + }, + "irregular-plurals": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/irregular-plurals/-/irregular-plurals-2.0.0.tgz", + "integrity": "sha512-Y75zBYLkh0lJ9qxeHlMjQ7bSbyiSqNW/UOPWDmzC7cXskL1hekSITh1Oc6JV0XCWWZ9DE8VYSB71xocLk3gmGw==", + "dev": true + }, + "is-absolute": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-absolute/-/is-absolute-1.0.0.tgz", + "integrity": "sha512-dOWoqflvcydARa360Gvv18DZ/gRuHKi2NU/wU5X1ZFzdYfH29nkiNZsF3mp4OJ3H4yo9Mx8A/uAGNzpzPN3yBA==", + "dev": true, + "requires": { + "is-relative": "^1.0.0", + "is-windows": "^1.0.1" + } + }, + "is-accessor-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-0.1.6.tgz", + "integrity": "sha1-qeEss66Nh2cn7u84Q/igiXtcmNY=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-arguments": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/is-arguments/-/is-arguments-1.0.4.tgz", + "integrity": "sha512-xPh0Rmt8NE65sNzvyUmWgI1tz3mKq74lGA0mL8LYZcoIzKOzDh6HmrYm3d18k60nHerC8A9Km8kYu87zfSFnLA==", + "dev": true + }, + "is-arrayish": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.2.1.tgz", + "integrity": "sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0=", + "dev": true + }, + "is-binary-path": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-1.0.1.tgz", + "integrity": "sha1-dfFmQrSA8YenEcgUFh/TpKdlWJg=", + "dev": true, + "requires": { + "binary-extensions": "^1.0.0" + } + }, + "is-buffer": { + "version": "1.1.6", + "resolved": "https://registry.npmjs.org/is-buffer/-/is-buffer-1.1.6.tgz", + "integrity": "sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==", + "dev": true + }, + "is-callable": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/is-callable/-/is-callable-1.2.0.tgz", + "integrity": "sha512-pyVD9AaGLxtg6srb2Ng6ynWJqkHU9bEM087AKck0w8QwDarTfNcpIYoU8x8Hv2Icm8u6kFJM18Dag8lyqGkviw==", + "dev": true + }, + "is-data-descriptor": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-0.1.4.tgz", + "integrity": "sha1-C17mSDiOLIYCgueT8YVv7D8wG1Y=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-date-object": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-date-object/-/is-date-object-1.0.2.tgz", + "integrity": "sha512-USlDT524woQ08aoZFzh3/Z6ch9Y/EWXEHQ/AaRN0SkKq4t2Jw2R2339tSXmwuVoY7LLlBCbOIlx2myP/L5zk0g==", + "dev": true + }, + "is-descriptor": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-0.1.6.tgz", + "integrity": "sha512-avDYr0SB3DwO9zsMov0gKCESFYqCnE4hq/4z3TdUlukEy5t9C0YRq7HLrsN52NAcqXKaepeCD0n+B0arnVG3Hg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^0.1.6", + "is-data-descriptor": "^0.1.4", + "kind-of": "^5.0.0" + }, + "dependencies": { + "kind-of": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-5.1.0.tgz", + "integrity": "sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==", + "dev": true + } + } + }, + "is-extendable": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-0.1.1.tgz", + "integrity": "sha1-YrEQ4omkcUGOPsNqYX1HLjAd/Ik=", + "dev": true + }, + "is-extglob": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/is-extglob/-/is-extglob-2.1.1.tgz", + "integrity": "sha1-qIwCU1eR8C7TfHahueqXc8gz+MI=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true + }, + "is-glob": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-4.0.1.tgz", + "integrity": "sha512-5G0tKtBTFImOqDnLB2hG6Bp2qcKEFduo4tZu9MT/H6NQv/ghhy30o55ufafxJ/LdH79LLs2Kfrn85TLKyA7BUg==", + "dev": true, + "requires": { + "is-extglob": "^2.1.1" + } + }, + "is-map": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-map/-/is-map-2.0.1.tgz", + "integrity": "sha512-T/S49scO8plUiAOA2DBTBG3JHpn1yiw0kRp6dgiZ0v2/6twi5eiB0rHtHFH9ZIrvlWc6+4O+m4zg5+Z833aXgw==", + "dev": true + }, + "is-negated-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-negated-glob/-/is-negated-glob-1.0.0.tgz", + "integrity": "sha1-aRC8pdqMleeEtXUbl2z1oQ/uNtI=", + "dev": true + }, + "is-number": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-3.0.0.tgz", + "integrity": "sha1-JP1iAaR4LPUFYcgQJ2r8fRLXEZU=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "is-path-cwd": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/is-path-cwd/-/is-path-cwd-2.2.0.tgz", + "integrity": "sha512-w942bTcih8fdJPJmQHFzkS76NEP8Kzzvmw92cXsazb8intwLqPibPPdXf4ANdKV3rYMuuQYGIWtvz9JilB3NFQ==", + "dev": true + }, + "is-path-inside": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/is-path-inside/-/is-path-inside-3.0.2.tgz", + "integrity": "sha512-/2UGPSgmtqwo1ktx8NDHjuPwZWmHhO+gj0f93EkhLB5RgW9RZevWYYlIkS6zePc6U2WpOdQYIwHe9YC4DWEBVg==", + "dev": true + }, + "is-plain-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-plain-obj/-/is-plain-obj-1.1.0.tgz", + "integrity": "sha1-caUMhCnfync8kqOQpKA7OfzVHT4=", + "dev": true + }, + "is-plain-object": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-5.0.0.tgz", + "integrity": "sha512-VRSzKkbMm5jMDoKLbltAkFQ5Qr7VDiTFGXxYFXXowVj387GeGNOCsOH6Msy00SGZ3Fp84b1Naa1psqgcCIEP5Q==", + "dev": true + }, + "is-promise": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/is-promise/-/is-promise-2.2.2.tgz", + "integrity": "sha512-+lP4/6lKUBfQjZ2pdxThZvLUAafmZb8OAxFb8XXtiQmS35INgr85hdOGoEs124ez1FCnZJt6jau/T+alh58QFQ==", + "dev": true + }, + "is-regex": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/is-regex/-/is-regex-1.1.1.tgz", + "integrity": "sha512-1+QkEcxiLlB7VEyFtyBg94e08OAsvq7FUBgApTq/w2ymCLyKJgDPsybBENVtA7XCQEgEXxKPonG+mvYRxh/LIg==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-relative": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-relative/-/is-relative-1.0.0.tgz", + "integrity": "sha512-Kw/ReK0iqwKeu0MITLFuj0jbPAmEiOsIwyIXvvbfa6QfmN9pkD1M+8pdk7Rl/dTKbH34/XBFMbgD4iMJhLQbGA==", + "dev": true, + "requires": { + "is-unc-path": "^1.0.0" + } + }, + "is-set": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/is-set/-/is-set-2.0.1.tgz", + "integrity": "sha512-eJEzOtVyenDs1TMzSQ3kU3K+E0GUS9sno+F0OBT97xsgcJsF9nXMBtkT9/kut5JEpM7oL7X/0qxR17K3mcwIAA==", + "dev": true + }, + "is-stream": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/is-stream/-/is-stream-1.1.0.tgz", + "integrity": "sha1-EtSj3U5o4Lec6428hBc66A2RykQ=", + "dev": true + }, + "is-string": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/is-string/-/is-string-1.0.5.tgz", + "integrity": "sha512-buY6VNRjhQMiF1qWDouloZlQbRhDPCebwxSjxMjxgemYT46YMd2NR0/H+fBhEfWX4A/w9TBJ+ol+okqJKFE6vQ==", + "dev": true + }, + "is-symbol": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/is-symbol/-/is-symbol-1.0.3.tgz", + "integrity": "sha512-OwijhaRSgqvhm/0ZdAcXNZt9lYdKFpcRDT5ULUuYXPoT794UNOdU+gpT6Rzo7b4V2HUl/op6GqY894AZwv9faQ==", + "dev": true, + "requires": { + "has-symbols": "^1.0.1" + } + }, + "is-unc-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-unc-path/-/is-unc-path-1.0.0.tgz", + "integrity": "sha512-mrGpVd0fs7WWLfVsStvgF6iEJnbjDFZh9/emhRDcGWTduTfNHd9CHeUwH3gYIjdbwo4On6hunkztwOaAw0yllQ==", + "dev": true, + "requires": { + "unc-path-regex": "^0.1.2" + } + }, + "is-utf8": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/is-utf8/-/is-utf8-0.2.1.tgz", + "integrity": "sha1-Sw2hRCEE0bM2NA6AeX6GXPOffXI=", + "dev": true + }, + "is-valid-glob": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-valid-glob/-/is-valid-glob-1.0.0.tgz", + "integrity": "sha1-Kb8+/3Ab4tTTFdusw5vDn+j2Aao=", + "dev": true + }, + "is-windows": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", + "integrity": "sha512-eXK1UInq2bPmjyX6e3VHIzMLobc4J94i4AWn+Hpq3OU5KkrRC96OAcR3PRJ/pGu6m8TRnBHP9dkXQVsT/COVIA==", + "dev": true + }, + "isarray": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-1.0.0.tgz", + "integrity": "sha1-u5NdSFgsuhaMBoNJV6VKPgcSTxE=", + "dev": true + }, + "isexe": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz", + "integrity": "sha1-6PvzdNxVb/iUehDcsFctYz8s+hA=", + "dev": true + }, + "isobject": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-3.0.1.tgz", + "integrity": "sha1-TkMekrEalzFjaqH5yNHMvP2reN8=", + "dev": true + }, + "istanbul": { + "version": "0.4.5", + "resolved": "https://registry.npmjs.org/istanbul/-/istanbul-0.4.5.tgz", + "integrity": "sha1-ZcfXPUxNqE1POsMQuRj7C4Azczs=", + "dev": true, + "requires": { + "abbrev": "1.0.x", + "async": "1.x", + "escodegen": "1.8.x", + "esprima": "2.7.x", + "glob": "^5.0.15", + "handlebars": "^4.0.1", + "js-yaml": "3.x", + "mkdirp": "0.5.x", + "nopt": "3.x", + "once": "1.x", + "resolve": "1.1.x", + "supports-color": "^3.1.0", + "which": "^1.1.1", + "wordwrap": "^1.0.0" + }, + "dependencies": { + "async": { + "version": "1.5.2", + "resolved": "https://registry.npmjs.org/async/-/async-1.5.2.tgz", + "integrity": "sha1-7GphrlZIDAw8skHJVhjiCJL5Zyo=", + "dev": true + }, + "esprima": { + "version": "2.7.3", + "resolved": "https://registry.npmjs.org/esprima/-/esprima-2.7.3.tgz", + "integrity": "sha1-luO3DVd59q1JzQMmc9HDEnZ7pYE=", + "dev": true + }, + "glob": { + "version": "5.0.15", + "resolved": "https://registry.npmjs.org/glob/-/glob-5.0.15.tgz", + "integrity": "sha1-G8k2ueAvSmA/zCIuz3Yz0wuLk7E=", + "dev": true, + "requires": { + "inflight": "^1.0.4", + "inherits": "2", + "minimatch": "2 || 3", + "once": "^1.3.0", + "path-is-absolute": "^1.0.0" + } + }, + "has-flag": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-1.0.0.tgz", + "integrity": "sha1-nZ55MWXOAXoA8AQYxD+UKnsdEfo=", + "dev": true + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "supports-color": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-3.2.3.tgz", + "integrity": "sha1-ZawFBLOVQXHYpklGsq48u4pfVPY=", + "dev": true, + "requires": { + "has-flag": "^1.0.0" + } + } + } + }, + "iterate-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/iterate-iterator/-/iterate-iterator-1.0.1.tgz", + "integrity": "sha512-3Q6tudGN05kbkDQDI4CqjaBf4qf85w6W6GnuZDtUVYwKgtC1q8yxYX7CZed7N+tLzQqS6roujWvszf13T+n9aw==", + "dev": true + }, + "iterate-value": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/iterate-value/-/iterate-value-1.0.2.tgz", + "integrity": "sha512-A6fMAio4D2ot2r/TYzr4yUWrmwNdsN5xL7+HUiyACE4DXm+q8HtPcnFTp+NnW3k4N05tZ7FVYFFb2CR13NxyHQ==", + "dev": true, + "requires": { + "es-get-iterator": "^1.0.2", + "iterate-iterator": "^1.0.1" + } + }, + "js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true + }, + "js-yaml": { + "version": "3.14.0", + "resolved": "https://registry.npmjs.org/js-yaml/-/js-yaml-3.14.0.tgz", + "integrity": "sha512-/4IbIeHcD9VMHFqDR/gQ7EdZdLimOvW2DdcxFjdyyZ9NsbS+ccrXqVWDtab/lRl5AlUqmpBx8EhPaWR+OtY17A==", + "dev": true, + "requires": { + "argparse": "^1.0.7", + "esprima": "^4.0.0" + } + }, + "jsdoctypeparser": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/jsdoctypeparser/-/jsdoctypeparser-6.1.0.tgz", + "integrity": "sha512-UCQBZ3xCUBv/PLfwKAJhp6jmGOSLFNKzrotXGNgbKhWvz27wPsCsVeP7gIcHPElQw2agBmynAitXqhxR58XAmA==", + "dev": true + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "https://registry.npmjs.org/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz", + "integrity": "sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg==", + "dev": true + }, + "json-stable-stringify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify/-/json-stable-stringify-0.0.1.tgz", + "integrity": "sha1-YRwj6BTbN1Un34URk9tZ3Sryf0U=", + "dev": true, + "requires": { + "jsonify": "~0.0.0" + } + }, + "json-stable-stringify-without-jsonify": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz", + "integrity": "sha1-nbe1lJatPzz+8wp1FC0tkwrXJlE=", + "dev": true + }, + "jsonfile": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/jsonfile/-/jsonfile-6.0.1.tgz", + "integrity": "sha512-jR2b5v7d2vIOust+w3wtFKZIfpC2pnRmFAhAC/BuweZFQR8qZzxH1OyrQ10HmdVYiXWkYUqPVsz91cG7EL2FBg==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.6", + "universalify": "^1.0.0" + } + }, + "jsonify": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/jsonify/-/jsonify-0.0.0.tgz", + "integrity": "sha1-LHS27kHZPKUbe1qu6PUDYx0lKnM=", + "dev": true + }, + "jsonparse": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/jsonparse/-/jsonparse-1.3.1.tgz", + "integrity": "sha1-P02uSpH6wxX3EGL4UhzCOfE2YoA=", + "dev": true + }, + "just-debounce": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/just-debounce/-/just-debounce-1.0.0.tgz", + "integrity": "sha1-h/zPrv/AtozRnVX2cilD+SnqNeo=", + "dev": true + }, + "kew": { + "version": "0.7.0", + "resolved": "https://registry.npmjs.org/kew/-/kew-0.7.0.tgz", + "integrity": "sha1-edk9LTM2PW/dKXCzNdkUGtWR15s=", + "dev": true + }, + "kind-of": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-6.0.3.tgz", + "integrity": "sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==", + "dev": true + }, + "labeled-stream-splicer": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/labeled-stream-splicer/-/labeled-stream-splicer-2.0.2.tgz", + "integrity": "sha512-Ca4LSXFFZUjPScRaqOcFxneA0VpKZr4MMYCljyQr4LIewTLb3Y0IUTIsnBBsVubIeEfxeSZpSjSsRM8APEQaAw==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "stream-splicer": "^2.0.0" + } + }, + "last-run": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/last-run/-/last-run-1.1.1.tgz", + "integrity": "sha1-RblpQsF7HHnHchmCWbqUO+v4yls=", + "dev": true, + "requires": { + "default-resolution": "^2.0.0", + "es6-weak-map": "^2.0.1" + } + }, + "lazystream": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lazystream/-/lazystream-1.0.0.tgz", + "integrity": "sha1-9plf4PggOS9hOWvolGJAe7dxaOQ=", + "dev": true, + "requires": { + "readable-stream": "^2.0.5" + } + }, + "lcid": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-1.0.0.tgz", + "integrity": "sha1-MIrMr6C8SDo4Z7S28rlQYlHRuDU=", + "dev": true, + "requires": { + "invert-kv": "^1.0.0" + } + }, + "lead": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/lead/-/lead-1.0.0.tgz", + "integrity": "sha1-bxT5mje+Op3XhPVJVpDlkDRm7kI=", + "dev": true, + "requires": { + "flush-write-stream": "^1.0.2" + } + }, + "levn": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/levn/-/levn-0.3.0.tgz", + "integrity": "sha1-OwmSTt+fCDwEkP3UwLxEIeBHZO4=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2" + } + }, + "liftoff": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/liftoff/-/liftoff-3.1.0.tgz", + "integrity": "sha512-DlIPlJUkCV0Ips2zf2pJP0unEoT1kwYhiiPUGF3s/jtxTCjziNLoiVVh+jqWOWeFi6mmwQ5fNxvAUyPad4Dfog==", + "dev": true, + "requires": { + "extend": "^3.0.0", + "findup-sync": "^3.0.0", + "fined": "^1.0.1", + "flagged-respawn": "^1.0.0", + "is-plain-object": "^2.0.4", + "object.map": "^1.0.0", + "rechoir": "^0.6.2", + "resolve": "^1.1.7" + }, + "dependencies": { + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + } + } + }, + "load-json-file": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-2.0.0.tgz", + "integrity": "sha1-eUfkIUmvgNaWy/eXvKq8/h/inKg=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "strip-bom": "^3.0.0" + } + }, + "locate-path": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-2.0.0.tgz", + "integrity": "sha1-K1aLJl7slExtnA3pw9u7ygNUzY4=", + "dev": true, + "requires": { + "p-locate": "^2.0.0", + "path-exists": "^3.0.0" + } + }, + "lodash": { + "version": "4.17.20", + "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.20.tgz", + "integrity": "sha512-PlhdFcillOINfeV7Ni6oF1TAEayyZBoZ8bcshTHqOYJYlrqzRK5hagpagky5o4HfCzzd1TRkXPMFq6cKk9rGmA==", + "dev": true + }, + "lodash.memoize": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/lodash.memoize/-/lodash.memoize-3.0.4.tgz", + "integrity": "sha1-LcvSwofLwKVcxCMovQxzYVDVPj8=", + "dev": true + }, + "log-symbols": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/log-symbols/-/log-symbols-4.0.0.tgz", + "integrity": "sha512-FN8JBzLx6CzeMrB0tg6pqlGU1wCrXW+ZXGH481kfsBqer0hToTIiHdjH4Mq8xJUbvATujKCvaREGWpGUionraA==", + "dev": true, + "requires": { + "chalk": "^4.0.0" + } + }, + "lru-queue": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/lru-queue/-/lru-queue-0.1.0.tgz", + "integrity": "sha1-Jzi9nw089PhEkMVzbEhpmsYyzaM=", + "dev": true, + "requires": { + "es5-ext": "~0.10.2" + } + }, + "make-iterator": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/make-iterator/-/make-iterator-1.0.1.tgz", + "integrity": "sha512-pxiuXh0iVEq7VM7KMIhs5gxsfxCux2URptUQaXo4iZZJxBAzTPOLE2BumO5dbfVYq/hBJFBR/a1mFDmOx5AGmw==", + "dev": true, + "requires": { + "kind-of": "^6.0.2" + } + }, + "map-age-cleaner": { + "version": "0.1.3", + "resolved": "https://registry.npmjs.org/map-age-cleaner/-/map-age-cleaner-0.1.3.tgz", + "integrity": "sha512-bJzx6nMoP6PDLPBFmg7+xRKeFZvFboMrGlxmNj9ClvX53KrmvM5bXFXEWjbz4cz1AFn+jWJ9z/DJSz7hrs0w3w==", + "dev": true, + "requires": { + "p-defer": "^1.0.0" + } + }, + "map-cache": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/map-cache/-/map-cache-0.2.2.tgz", + "integrity": "sha1-wyq9C9ZSXZsFFkW7TyasXcmKDb8=", + "dev": true + }, + "map-visit": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/map-visit/-/map-visit-1.0.0.tgz", + "integrity": "sha1-7Nyo8TFE5mDxtb1B8S80edmN+48=", + "dev": true, + "requires": { + "object-visit": "^1.0.0" + } + }, + "matchdep": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/matchdep/-/matchdep-2.0.0.tgz", + "integrity": "sha1-xvNINKDY28OzfCfui7yyfHd1WC4=", + "dev": true, + "requires": { + "findup-sync": "^2.0.0", + "micromatch": "^3.0.4", + "resolve": "^1.4.0", + "stack-trace": "0.0.10" + }, + "dependencies": { + "findup-sync": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/findup-sync/-/findup-sync-2.0.0.tgz", + "integrity": "sha1-kyaxSIwi0aYIhlCoaQGy2akKLLw=", + "dev": true, + "requires": { + "detect-file": "^1.0.0", + "is-glob": "^3.1.0", + "micromatch": "^3.0.4", + "resolve-dir": "^1.0.1" + } + }, + "is-glob": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/is-glob/-/is-glob-3.1.0.tgz", + "integrity": "sha1-e6WuJCF4BKxwcHuWkiVnSGzD6Eo=", + "dev": true, + "requires": { + "is-extglob": "^2.1.0" + } + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + } + } + }, + "md5.js": { + "version": "1.3.5", + "resolved": "https://registry.npmjs.org/md5.js/-/md5.js-1.3.5.tgz", + "integrity": "sha512-xitP+WxNPcTTOgnTJcrhM0xvdPepipPSf3I8EIpGKeFLjt3PlJLIDG3u8EX53ZIubkb+5U2+3rELYpEhHhzdkg==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1", + "safe-buffer": "^5.1.2" + } + }, + "mem": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/mem/-/mem-4.3.0.tgz", + "integrity": "sha512-qX2bG48pTqYRVmDB37rn/6PT7LcR8T7oAX3bf99u1Tt1nzxYfxkgqDwUwolPlXweM0XzBOBFzSx4kfp7KP1s/w==", + "dev": true, + "requires": { + "map-age-cleaner": "^0.1.1", + "mimic-fn": "^2.0.0", + "p-is-promise": "^2.0.0" + } + }, + "memoizee": { + "version": "0.4.14", + "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.14.tgz", + "integrity": "sha512-/SWFvWegAIYAO4NQMpcX+gcra0yEZu4OntmUdrBaWrJncxOqAziGFlHxc7yjKVK2uu3lpPW27P27wkR82wA8mg==", + "dev": true, + "requires": { + "d": "1", + "es5-ext": "^0.10.45", + "es6-weak-map": "^2.0.2", + "event-emitter": "^0.3.5", + "is-promise": "^2.1", + "lru-queue": "0.1", + "next-tick": "1", + "timers-ext": "^0.1.5" + } + }, + "merge2": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/merge2/-/merge2-1.4.1.tgz", + "integrity": "sha512-8q7VEgMJW4J8tcfVPy8g09NcQwZdbwFEqhe/WZkoIzjn/3TGDwtOCYtXGxA3O8tPzpczCCDgv+P2P5y00ZJOOg==", + "dev": true + }, + "micromatch": { + "version": "3.1.10", + "resolved": "https://registry.npmjs.org/micromatch/-/micromatch-3.1.10.tgz", + "integrity": "sha512-MWikgl9n9M3w+bpsY3He8L+w9eF9338xRl8IAO5viDizwSzziFEyUzo2xrrloB64ADbTf8uA8vRqqttDTOmccg==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "braces": "^2.3.1", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "extglob": "^2.0.4", + "fragment-cache": "^0.2.1", + "kind-of": "^6.0.2", + "nanomatch": "^1.2.9", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.2" + } + }, + "miller-rabin": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/miller-rabin/-/miller-rabin-4.0.1.tgz", + "integrity": "sha512-115fLhvZVqWwHPbClyntxEVfVDfl9DLLTuJvq3g2O/Oxi8AiNouAHvDSzHS0viUJc+V5vm3eq91Xwqn9dp4jRA==", + "dev": true, + "requires": { + "bn.js": "^4.0.0", + "brorand": "^1.0.1" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } + } + }, + "mime-db": { + "version": "1.44.0", + "resolved": "https://registry.npmjs.org/mime-db/-/mime-db-1.44.0.tgz", + "integrity": "sha512-/NOTfLrsPBVeH7YtFPgsVWveuL+4SjjYxaQ1xtM1KMFj7HdxlBlxeyNLzhyJVx7r4rZGJAZ/6lkKCitSc/Nmpg==", + "dev": true + }, + "mime-types": { + "version": "2.1.27", + "resolved": "https://registry.npmjs.org/mime-types/-/mime-types-2.1.27.tgz", + "integrity": "sha512-JIhqnCasI9yD+SsmkquHBxTSEuZdQX5BuQnS2Vc7puQQQ+8yiP5AY5uWhpdv4YL4VM5c6iliiYWPgJ/nJQLp7w==", + "dev": true, + "requires": { + "mime-db": "1.44.0" + } + }, + "mimic-fn": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/mimic-fn/-/mimic-fn-2.1.0.tgz", + "integrity": "sha512-OqbOk5oEQeAZ8WXWydlu9HJjz9WVdEIvamMCcXmuqUYjTknH/sqsWvhQ3vgwKFRR1HpjvNBKQ37nbJgYzGqGcg==", + "dev": true + }, + "minimalistic-assert": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-assert/-/minimalistic-assert-1.0.1.tgz", + "integrity": "sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==", + "dev": true + }, + "minimalistic-crypto-utils": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/minimalistic-crypto-utils/-/minimalistic-crypto-utils-1.0.1.tgz", + "integrity": "sha1-9sAMHAsIIkblxNmd+4x8CDsrWCo=", + "dev": true + }, + "minimatch": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.0.4.tgz", + "integrity": "sha512-yJHVQEhyqPLUTgt9B83PXu6W3rx4MvvHvSUvToogpwoGDOUQ+yDrR0HRot+yOCdCO7u4hX3pWft6kWBBcqh0UA==", + "dev": true, + "requires": { + "brace-expansion": "^1.1.7" + } + }, + "minimist": { + "version": "1.2.5", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.5.tgz", + "integrity": "sha512-FM9nNUYrRBAELZQT3xeZQ7fmMOBg6nWNmJKTcgsJeaLstP/UODVpGsr5OhXhhXg6f+qtJ8uiZ+PUxkDWcgIXLw==", + "dev": true + }, + "mixin-deep": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/mixin-deep/-/mixin-deep-1.3.2.tgz", + "integrity": "sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==", + "dev": true, + "requires": { + "for-in": "^1.0.2", + "is-extendable": "^1.0.1" + }, + "dependencies": { + "is-extendable": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/is-extendable/-/is-extendable-1.0.1.tgz", + "integrity": "sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==", + "dev": true, + "requires": { + "is-plain-object": "^2.0.4" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + } + } + }, + "mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true + }, + "mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true + }, + "mocha": { + "version": "8.1.3", + "resolved": "https://registry.npmjs.org/mocha/-/mocha-8.1.3.tgz", + "integrity": "sha512-ZbaYib4hT4PpF4bdSO2DohooKXIn4lDeiYqB+vTmCdr6l2woW0b6H3pf5x4sM5nwQMru9RvjjHYWVGltR50ZBw==", + "dev": true, + "requires": { + "ansi-colors": "4.1.1", + "browser-stdout": "1.3.1", + "chokidar": "3.4.2", + "debug": "4.1.1", + "diff": "4.0.2", + "escape-string-regexp": "4.0.0", + "find-up": "5.0.0", + "glob": "7.1.6", + "growl": "1.10.5", + "he": "1.2.0", + "js-yaml": "3.14.0", + "log-symbols": "4.0.0", + "minimatch": "3.0.4", + "ms": "2.1.2", + "object.assign": "4.1.0", + "promise.allsettled": "1.0.2", + "serialize-javascript": "4.0.0", + "strip-json-comments": "3.0.1", + "supports-color": "7.1.0", + "which": "2.0.2", + "wide-align": "1.1.3", + "workerpool": "6.0.0", + "yargs": "13.3.2", + "yargs-parser": "13.1.2", + "yargs-unparser": "1.6.1" + }, + "dependencies": { + "ansi-colors": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.1.tgz", + "integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA==", + "dev": true + }, + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "anymatch": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/anymatch/-/anymatch-3.1.1.tgz", + "integrity": "sha512-mM8522psRCqzV+6LhomX5wgp25YVibjh8Wj23I5RPkPppSVSjyKD2A2mBJmWGa+KN7f2D6LNh9jkBCeyLktzjg==", + "dev": true, + "requires": { + "normalize-path": "^3.0.0", + "picomatch": "^2.0.4" + } + }, + "binary-extensions": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/binary-extensions/-/binary-extensions-2.1.0.tgz", + "integrity": "sha512-1Yj8h9Q+QDF5FzhMs/c9+6UntbD5MkRfRwac8DoEm9ZfUBZ7tZ55YcGVAzEe4bXsdQHEk+s9S5wsOKVdZrw0tQ==", + "dev": true + }, + "braces": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/braces/-/braces-3.0.2.tgz", + "integrity": "sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==", + "dev": true, + "requires": { + "fill-range": "^7.0.1" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "chokidar": { + "version": "3.4.2", + "resolved": "https://registry.npmjs.org/chokidar/-/chokidar-3.4.2.tgz", + "integrity": "sha512-IZHaDeBeI+sZJRX7lGcXsdzgvZqKv6sECqsbErJA4mHWfpRrD8B97kSFN4cQz6nGBGiuFia1MKR4d6c1o8Cv7A==", + "dev": true, + "requires": { + "anymatch": "~3.1.1", + "braces": "~3.0.2", + "fsevents": "~2.1.2", + "glob-parent": "~5.1.0", + "is-binary-path": "~2.1.0", + "is-glob": "~4.0.1", + "normalize-path": "~3.0.0", + "readdirp": "~3.4.0" + } + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "debug": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.1.1.tgz", + "integrity": "sha512-pYAIzeRo8J6KPEaJ0VWOh5Pzkbw/RetuzehGM7QRRX5he4fPHx2rdKMB256ehJCkX+XRQm16eZLqLNS8RSZXZw==", + "dev": true, + "requires": { + "ms": "^2.1.1" + } + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "dev": true + }, + "fill-range": { + "version": "7.0.1", + "resolved": "https://registry.npmjs.org/fill-range/-/fill-range-7.0.1.tgz", + "integrity": "sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==", + "dev": true, + "requires": { + "to-regex-range": "^5.0.1" + } + }, + "find-up": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", + "integrity": "sha512-78/PXT1wlLLDgTzDs7sjq9hzz0vXD+zn+7wypEe4fXQxCmdmqfGsEPQxmiCSQI3ajFV91bVSsvNtrJRiW6nGng==", + "dev": true, + "requires": { + "locate-path": "^6.0.0", + "path-exists": "^4.0.0" + } + }, + "fsevents": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.1.3.tgz", + "integrity": "sha512-Auw9a4AxqWpa9GUfj370BMPzzyncfBABW8Mab7BGWBYDj4Isgq+cDKtx0i6u9jcX9pQDnswsaaOTgTmA5pEjuQ==", + "dev": true, + "optional": true + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "glob-parent": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/glob-parent/-/glob-parent-5.1.1.tgz", + "integrity": "sha512-FnI+VGOpnlGHWZxthPGR+QhR78fuiK0sNLkHQv+bL9fQi57lNNdquIbna/WrfROrolq8GK5Ek6BiMwqL/voRYQ==", + "dev": true, + "requires": { + "is-glob": "^4.0.1" + } + }, + "is-binary-path": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/is-binary-path/-/is-binary-path-2.1.0.tgz", + "integrity": "sha512-ZMERYes6pDydyuGidse7OsHxtbI7WVeUEozgR/g7rd0xUimYNlvZRE/K2MgZTjWy725IfelLeVcEM97mmtRGXw==", + "dev": true, + "requires": { + "binary-extensions": "^2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "is-number": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/is-number/-/is-number-7.0.0.tgz", + "integrity": "sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==", + "dev": true + }, + "locate-path": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-6.0.0.tgz", + "integrity": "sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==", + "dev": true, + "requires": { + "p-locate": "^5.0.0" + } + }, + "p-limit": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-3.0.2.tgz", + "integrity": "sha512-iwqZSOoWIW+Ew4kAGUlN16J4M7OB3ysMLSZtnhmqx7njIHFPlxWBX8xo3lVTyFVq6mI/lL9qt2IsN1sHwaxJkg==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-5.0.0.tgz", + "integrity": "sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==", + "dev": true, + "requires": { + "p-limit": "^3.0.2" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "path-exists": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-4.0.0.tgz", + "integrity": "sha512-ak9Qy5Q7jYb2Wwcey5Fpvg2KoAc/ZIhLSLOSBmRmygPsGwkVVt0fZa0qrtMz+m6tJTAHfZQ8FnmB4MG4LWy7/w==", + "dev": true + }, + "readdirp": { + "version": "3.4.0", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.4.0.tgz", + "integrity": "sha512-0xe001vZBnJEK+uKcj8qOhyAKPzIT+gStxWr3LCB0DwcXR5NZJ3IaC+yGnHCYzB/S7ov3m3EEbZI2zeNvX+hGQ==", + "dev": true, + "requires": { + "picomatch": "^2.2.1" + } + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "strip-json-comments": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.0.1.tgz", + "integrity": "sha512-VTyMAUfdm047mwKl+u79WIdrZxtFtn+nBxHeb844XBQ9uMNTuTHdx2hc5RiAJYqwTj3wc/xe5HLSdJSkJ+WfZw==", + "dev": true + }, + "to-regex-range": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-5.0.1.tgz", + "integrity": "sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==", + "dev": true, + "requires": { + "is-number": "^7.0.0" + } + }, + "which": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", + "integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "13.3.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-13.3.2.tgz", + "integrity": "sha512-AX3Zw5iPruN5ie6xGRIDgqkT+ZhnRlZMLMHAs8tg7nRruy2Nb+i5o9bwghAogtM08q1dpr2LVoS8KSTMYpWXUw==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^13.1.2" + }, + "dependencies": { + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + } + } + }, + "yargs-parser": { + "version": "13.1.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-13.1.2.tgz", + "integrity": "sha512-3lbsNRf/j+A4QuSZfDRA7HRSfWrzO0YjqTJd5kjAq37Zep1CEgaYmrH9Q3GwPiB9cHyd1Y1UwggGhJGoxipbzg==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + }, + "mocha-fivemat-progress-reporter": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/mocha-fivemat-progress-reporter/-/mocha-fivemat-progress-reporter-0.1.0.tgz", + "integrity": "sha1-zK/w4ckc9Vf+d+B535lUuRt0d1Y=", + "dev": true + }, + "module-deps": { + "version": "6.2.3", + "resolved": "https://registry.npmjs.org/module-deps/-/module-deps-6.2.3.tgz", + "integrity": "sha512-fg7OZaQBcL4/L+AK5f4iVqf9OMbCclXfy/znXRxTVhJSeW5AIlS9AwheYwDaXM3lVW7OBeaeUEY3gbaC6cLlSA==", + "dev": true, + "requires": { + "JSONStream": "^1.0.3", + "browser-resolve": "^2.0.0", + "cached-path-relative": "^1.0.2", + "concat-stream": "~1.6.0", + "defined": "^1.0.0", + "detective": "^5.2.0", + "duplexer2": "^0.1.2", + "inherits": "^2.0.1", + "parents": "^1.0.0", + "readable-stream": "^2.0.2", + "resolve": "^1.4.0", + "stream-combiner2": "^1.1.1", + "subarg": "^1.0.0", + "through2": "^2.0.0", + "xtend": "^4.0.0" + }, + "dependencies": { + "browser-resolve": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/browser-resolve/-/browser-resolve-2.0.0.tgz", + "integrity": "sha512-7sWsQlYL2rGLy2IWm8WL8DCTJvYLc/qlOnsakDac87SOoCd16WLsaAMdCiAqsTNHIe+SXfaqyxyo6THoWqs8WQ==", + "dev": true, + "requires": { + "resolve": "^1.17.0" + } + }, + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "ms": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", + "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", + "dev": true + }, + "mute-stdout": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/mute-stdout/-/mute-stdout-1.0.1.tgz", + "integrity": "sha512-kDcwXR4PS7caBpuRYYBUz9iVixUk3anO3f5OYFiIPwK/20vCzKCHyKoulbiDY1S53zD2bxUpxN/IJ+TnXjfvxg==", + "dev": true + }, + "mute-stream": { + "version": "0.0.8", + "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", + "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", + "dev": true + }, + "nan": { + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.14.1.tgz", + "integrity": "sha512-isWHgVjnFjh2x2yuJ/tj3JbwoHu3UC2dX5G/88Cm24yB6YopVgxvBObDY7n5xW6ExmFhJpSEQqFPvq9zaXc8Jw==", + "dev": true, + "optional": true + }, + "nanomatch": { + "version": "1.2.13", + "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", + "integrity": "sha512-fpoe2T0RbHwBTBUOftAfBPaDEi06ufaUai0mE6Yn1kacc3SnTErfb/h+X94VXzI64rKFHYImXSvdwGGCmwOqCA==", + "dev": true, + "requires": { + "arr-diff": "^4.0.0", + "array-unique": "^0.3.2", + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "fragment-cache": "^0.2.1", + "is-windows": "^1.0.2", + "kind-of": "^6.0.2", + "object.pick": "^1.3.0", + "regex-not": "^1.0.0", + "snapdragon": "^0.8.1", + "to-regex": "^3.0.1" + } + }, + "natural-compare": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz", + "integrity": "sha1-Sr6/7tdUHywnrPspvbvRXI1bpPc=", + "dev": true + }, + "neo-async": { + "version": "2.6.2", + "resolved": "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz", + "integrity": "sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw==", + "dev": true + }, + "next-tick": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/next-tick/-/next-tick-1.0.0.tgz", + "integrity": "sha1-yobR/ogoFpsBICCOPchCS524NCw=", + "dev": true + }, + "nice-try": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/nice-try/-/nice-try-1.0.5.tgz", + "integrity": "sha512-1nh45deeb5olNY7eX82BkPO7SSxR5SSYJiPTrTdFUVYwAl8CKMA5N9PjTYkHiRjisVcxcQ1HXdLhx2qxxJzLNQ==", + "dev": true + }, + "node-fetch": { + "version": "2.6.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.6.0.tgz", + "integrity": "sha512-8dG4H5ujfvFiqDmVu9fQ5bOHUC15JMjMY/Zumv26oOvvVJjM67KF8koCWIabKQ1GJIa9r2mMZscBq/TbdOcmNA==", + "dev": true + }, + "nopt": { + "version": "3.0.6", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-3.0.6.tgz", + "integrity": "sha1-xkZdvwirzU2zWTF/eaxopkayj/k=", + "dev": true, + "requires": { + "abbrev": "1" + } + }, + "normalize-package-data": { + "version": "2.5.0", + "resolved": "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz", + "integrity": "sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==", + "dev": true, + "requires": { + "hosted-git-info": "^2.1.4", + "resolve": "^1.10.0", + "semver": "2 || 3 || 4 || 5", + "validate-npm-package-license": "^3.0.1" + }, + "dependencies": { + "resolve": { + "version": "1.17.0", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.17.0.tgz", + "integrity": "sha512-ic+7JYiV8Vi2yzQGFWOkiZD5Z9z7O2Zhm9XMaTxdJExKasieFCr+yXZ/WmXsckHiKl12ar0y6XiXDx3m4RHn1w==", + "dev": true, + "requires": { + "path-parse": "^1.0.6" + } + }, + "semver": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", + "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", + "dev": true + } + } + }, + "normalize-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", + "integrity": "sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==", + "dev": true + }, + "now-and-later": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/now-and-later/-/now-and-later-2.0.1.tgz", + "integrity": "sha512-KGvQ0cB70AQfg107Xvs/Fbu+dGmZoTRJp2TaPwcwQm3/7PteUyN2BCgk8KBMPGBUXZdVwyWS8fDCGFygBm19UQ==", + "dev": true, + "requires": { + "once": "^1.3.2" + } + }, + "npm-run-path": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/npm-run-path/-/npm-run-path-2.0.2.tgz", + "integrity": "sha1-NakjLfo11wZ7TLLd8jV7GHFTbF8=", + "dev": true, + "requires": { + "path-key": "^2.0.0" + } + }, + "number-is-nan": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/number-is-nan/-/number-is-nan-1.0.1.tgz", + "integrity": "sha1-CXtgK1NCKlIsGvuHkDGDNpQaAR0=", + "dev": true + }, + "object-assign": { + "version": "4.1.1", + "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", + "integrity": "sha1-IQmtx5ZYh8/AXLvUQsrIv7s2CGM=", + "dev": true + }, + "object-copy": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/object-copy/-/object-copy-0.1.0.tgz", + "integrity": "sha1-fn2Fi3gb18mRpBupde04EnVOmYw=", + "dev": true, + "requires": { + "copy-descriptor": "^0.1.0", + "define-property": "^0.2.5", + "kind-of": "^3.0.3" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "object-inspect": { + "version": "1.8.0", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.8.0.tgz", + "integrity": "sha512-jLdtEOB112fORuypAyl/50VRVIBIdVQOSUUGQHzJ4xBSbit81zRarz7GThkEFZy1RceYrWYcPcBFPQwHyAc1gA==", + "dev": true + }, + "object-keys": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object-keys/-/object-keys-1.1.1.tgz", + "integrity": "sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==", + "dev": true + }, + "object-visit": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object-visit/-/object-visit-1.0.1.tgz", + "integrity": "sha1-95xEk68MU3e1n+OdOV5BBC3QRbs=", + "dev": true, + "requires": { + "isobject": "^3.0.0" + } + }, + "object.assign": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.0.tgz", + "integrity": "sha512-exHJeq6kBKj58mqGyTQ9DFvrZC/eR6OwxzoM9YRoGBqrXYonaFyGiFMuc9VZrXf7DarreEwMpurG3dd+CNyW5w==", + "dev": true, + "requires": { + "define-properties": "^1.1.2", + "function-bind": "^1.1.1", + "has-symbols": "^1.0.0", + "object-keys": "^1.0.11" + } + }, + "object.defaults": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/object.defaults/-/object.defaults-1.1.0.tgz", + "integrity": "sha1-On+GgzS0B96gbaFtiNXNKeQ1/s8=", + "dev": true, + "requires": { + "array-each": "^1.0.1", + "array-slice": "^1.0.0", + "for-own": "^1.0.0", + "isobject": "^3.0.0" + } + }, + "object.map": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.map/-/object.map-1.0.1.tgz", + "integrity": "sha1-z4Plncj8wK1fQlDh94s7gb2AHTc=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.pick": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/object.pick/-/object.pick-1.3.0.tgz", + "integrity": "sha1-h6EKxMFpS9Lhy/U1kaZhQftd10c=", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + }, + "object.reduce": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/object.reduce/-/object.reduce-1.0.1.tgz", + "integrity": "sha1-b+NI8qx/oPlcpiEiZZkJaCW7A60=", + "dev": true, + "requires": { + "for-own": "^1.0.0", + "make-iterator": "^1.0.0" + } + }, + "object.values": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/object.values/-/object.values-1.1.1.tgz", + "integrity": "sha512-WTa54g2K8iu0kmS/us18jEmdv1a4Wi//BZ/DTVYEcH0XhLM5NYdpDHja3gt57VrZLcNAO2WGA+KpWsDBaHt6eA==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "has": "^1.0.3" + } + }, + "once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", + "dev": true, + "requires": { + "wrappy": "1" + } + }, + "onetime": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/onetime/-/onetime-5.1.2.tgz", + "integrity": "sha512-kbpaSSGJTWdAY5KPVeMOKXSrPtr8C8C7wodJbcsd51jRnmD+GZu8Y0VoU6Dm5Z4vWr0Ig/1NKuWRKf7j5aaYSg==", + "dev": true, + "requires": { + "mimic-fn": "^2.1.0" + } + }, + "optionator": { + "version": "0.8.3", + "resolved": "https://registry.npmjs.org/optionator/-/optionator-0.8.3.tgz", + "integrity": "sha512-+IW9pACdk3XWmmTXG8m3upGUJst5XRGzxMRjXzAuJ1XnIFNvfhjjIuYkDvysnPQ7qzqVzLt78BCruntqRhWQbA==", + "dev": true, + "requires": { + "deep-is": "~0.1.3", + "fast-levenshtein": "~2.0.6", + "levn": "~0.3.0", + "prelude-ls": "~1.1.2", + "type-check": "~0.3.2", + "word-wrap": "~1.2.3" + } + }, + "ordered-read-streams": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/ordered-read-streams/-/ordered-read-streams-1.0.1.tgz", + "integrity": "sha1-d8DLN8QVJdZBZtmQ/61+xqDhNj4=", + "dev": true, + "requires": { + "readable-stream": "^2.0.1" + } + }, + "os-browserify": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/os-browserify/-/os-browserify-0.3.0.tgz", + "integrity": "sha1-hUNzx/XCMVkU/Jv8a9gjj92h7Cc=", + "dev": true + }, + "os-locale": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-1.4.0.tgz", + "integrity": "sha1-IPnxeuKe00XoveWDsT0gCYA8FNk=", + "dev": true, + "requires": { + "lcid": "^1.0.0" + } + }, + "os-tmpdir": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/os-tmpdir/-/os-tmpdir-1.0.2.tgz", + "integrity": "sha1-u+Z0BseaqFxc/sdm/lc0VV36EnQ=", + "dev": true + }, + "p-defer": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-defer/-/p-defer-1.0.0.tgz", + "integrity": "sha1-n26xgvbJqozXQwBKfU+WsZaw+ww=", + "dev": true + }, + "p-finally": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-finally/-/p-finally-1.0.0.tgz", + "integrity": "sha1-P7z7FbiZpEEjs0ttzBi3JDNqLK4=", + "dev": true + }, + "p-is-promise": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/p-is-promise/-/p-is-promise-2.1.0.tgz", + "integrity": "sha512-Y3W0wlRPK8ZMRbNq97l4M5otioeA5lm1z7bkNkxCka8HSPjR0xRWmpCmc9utiaLP9Jb1eD8BgeIxTW4AIF45Pg==", + "dev": true + }, + "p-limit": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-1.3.0.tgz", + "integrity": "sha512-vvcXsLAJ9Dr5rQOPk7toZQZJApBl2K4J6dANSsEuh6QI41JYcsS/qhTGa9ErIUUgK3WNQoJYvylxvjqmiqEA9Q==", + "dev": true, + "requires": { + "p-try": "^1.0.0" + } + }, + "p-locate": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-2.0.0.tgz", + "integrity": "sha1-IKAQOyIqcMj9OcwuWAaA893l7EM=", + "dev": true, + "requires": { + "p-limit": "^1.1.0" + } + }, + "p-map": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-map/-/p-map-3.0.0.tgz", + "integrity": "sha512-d3qXVTF/s+W+CdJ5A29wywV2n8CQQYahlgz2bFiA+4eVNJbHJodPZ+/gXwPGh0bOqA+j8S+6+ckmvLGPk1QpxQ==", + "dev": true, + "requires": { + "aggregate-error": "^3.0.0" + } + }, + "p-try": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-1.0.0.tgz", + "integrity": "sha1-y8ec26+P1CKOE/Yh8rGiN8GyB7M=", + "dev": true + }, + "pako": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/pako/-/pako-1.0.11.tgz", + "integrity": "sha512-4hLB8Py4zZce5s4yd9XzopqwVv/yGNhV1Bl8NTmCq1763HeK2+EwVTv+leGeL13Dnh2wfbqowVPXCIO0z4taYw==", + "dev": true + }, + "parent-module": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parent-module/-/parent-module-1.0.1.tgz", + "integrity": "sha512-GQ2EWRpQV8/o+Aw8YqtfZZPfNRWZYkbidE9k5rpl/hC3vtHHBfGm2Ifi6qWV+coDGkrUKZAxE3Lot5kcsRlh+g==", + "dev": true, + "requires": { + "callsites": "^3.0.0" + } + }, + "parents": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parents/-/parents-1.0.1.tgz", + "integrity": "sha1-/t1NK/GTp3dF/nHjcdc8MwfZx1E=", + "dev": true, + "requires": { + "path-platform": "~0.11.15" + } + }, + "parse-asn1": { + "version": "5.1.6", + "resolved": "https://registry.npmjs.org/parse-asn1/-/parse-asn1-5.1.6.tgz", + "integrity": "sha512-RnZRo1EPU6JBnra2vGHj0yhp6ebyjBZpmUCLHWiFhxlzvBCCpAuZ7elsBp1PVAbQN0/04VD/19rfzlBSwLstMw==", + "dev": true, + "requires": { + "asn1.js": "^5.2.0", + "browserify-aes": "^1.0.0", + "evp_bytestokey": "^1.0.0", + "pbkdf2": "^3.0.3", + "safe-buffer": "^5.1.1" + } + }, + "parse-filepath": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/parse-filepath/-/parse-filepath-1.0.2.tgz", + "integrity": "sha1-pjISf1Oq89FYdvWHLz/6x2PWyJE=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "map-cache": "^0.2.0", + "path-root": "^0.1.1" + } + }, + "parse-json": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/parse-json/-/parse-json-2.2.0.tgz", + "integrity": "sha1-9ID0BDTvgHQfhGkJn43qGPVaTck=", + "dev": true, + "requires": { + "error-ex": "^1.2.0" + } + }, + "parse-node-version": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/parse-node-version/-/parse-node-version-1.0.1.tgz", + "integrity": "sha512-3YHlOa/JgH6Mnpr05jP9eDG254US9ek25LyIxZlDItp2iJtwyaXQb57lBYLdT3MowkUFYEV2XXNAYIPlESvJlA==", + "dev": true + }, + "parse-passwd": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/parse-passwd/-/parse-passwd-1.0.0.tgz", + "integrity": "sha1-bVuTSkVpk7I9N/QKOC1vFmao5cY=", + "dev": true + }, + "pascalcase": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/pascalcase/-/pascalcase-0.1.1.tgz", + "integrity": "sha1-s2PlXoAGym/iF4TS2yK9FdeRfxQ=", + "dev": true + }, + "path-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/path-browserify/-/path-browserify-0.0.1.tgz", + "integrity": "sha512-BapA40NHICOS+USX9SN4tyhq+A2RrN/Ws5F0Z5aMHDp98Fl86lX8Oti8B7uN93L4Ifv4fHOEA+pQw87gmMO/lQ==", + "dev": true + }, + "path-dirname": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/path-dirname/-/path-dirname-1.0.2.tgz", + "integrity": "sha1-zDPSTVJeCZpTiMAzbG4yuRYGCeA=", + "dev": true + }, + "path-exists": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-3.0.0.tgz", + "integrity": "sha1-zg6+ql94yxiSXqfYENe1mwEP1RU=", + "dev": true + }, + "path-is-absolute": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", + "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", + "dev": true + }, + "path-key": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/path-key/-/path-key-2.0.1.tgz", + "integrity": "sha1-QRyttXTFoUDTpLGRDUDYDMn0C0A=", + "dev": true + }, + "path-parse": { + "version": "1.0.6", + "resolved": "https://registry.npmjs.org/path-parse/-/path-parse-1.0.6.tgz", + "integrity": "sha512-GSmOT2EbHrINBf9SR7CDELwlJ8AENk3Qn7OikK4nFYAu3Ote2+JYNVvkpAEQm3/TLNEJFD/xZJjzyxg3KBWOzw==", + "dev": true + }, + "path-platform": { + "version": "0.11.15", + "resolved": "https://registry.npmjs.org/path-platform/-/path-platform-0.11.15.tgz", + "integrity": "sha1-6GQhf3TDaFDwhSt43Hv31KVyG/I=", + "dev": true + }, + "path-root": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/path-root/-/path-root-0.1.1.tgz", + "integrity": "sha1-mkpoFMrBwM1zNgqV8yCDyOpHRbc=", + "dev": true, + "requires": { + "path-root-regex": "^0.1.0" + } + }, + "path-root-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/path-root-regex/-/path-root-regex-0.1.2.tgz", + "integrity": "sha1-v8zcjfWxLcUsi0PsONGNcsBLqW0=", + "dev": true + }, + "path-type": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-4.0.0.tgz", + "integrity": "sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==", + "dev": true + }, + "pathval": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-1.1.0.tgz", + "integrity": "sha1-uULm1L3mUwBe9rcTYd74cn0GReA=", + "dev": true + }, + "pbkdf2": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/pbkdf2/-/pbkdf2-3.1.1.tgz", + "integrity": "sha512-4Ejy1OPxi9f2tt1rRV7Go7zmfDQ+ZectEQz3VGUQhgq62HtIRPDyG/JtnwIxs6x3uNMwo2V7q1fMvKjb+Tnpqg==", + "dev": true, + "requires": { + "create-hash": "^1.1.2", + "create-hmac": "^1.1.4", + "ripemd160": "^2.0.1", + "safe-buffer": "^5.0.1", + "sha.js": "^2.4.8" + } + }, + "picomatch": { + "version": "2.2.2", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-2.2.2.tgz", + "integrity": "sha512-q0M/9eZHzmr0AulXyPwNfZjtwZ/RBZlbN3K3CErVrk50T2ASYI7Bye0EvekFY3IP1Nt2DHu0re+V2ZHIpMkuWg==", + "dev": true + }, + "pify": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/pify/-/pify-2.3.0.tgz", + "integrity": "sha1-7RQaasBDqEnqWISY59yosVMw6Qw=", + "dev": true + }, + "pinkie": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/pinkie/-/pinkie-2.0.4.tgz", + "integrity": "sha1-clVrgM+g1IqXToDnckjoDtT3+HA=", + "dev": true + }, + "pinkie-promise": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pinkie-promise/-/pinkie-promise-2.0.1.tgz", + "integrity": "sha1-ITXW36ejWMBprJsXh3YogihFD/o=", + "dev": true, + "requires": { + "pinkie": "^2.0.0" + } + }, + "pkg-dir": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/pkg-dir/-/pkg-dir-2.0.0.tgz", + "integrity": "sha1-9tXREJ4Z1j7fQo4L1X4Sd3YVM0s=", + "dev": true, + "requires": { + "find-up": "^2.1.0" + } + }, + "plugin-error": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/plugin-error/-/plugin-error-1.0.1.tgz", + "integrity": "sha512-L1zP0dk7vGweZME2i+EeakvUNqSrdiI3F91TwEoYiGrAfUXmVv6fJIq4g82PAXxNsWOp0J7ZqQy/3Szz0ajTxA==", + "dev": true, + "requires": { + "ansi-colors": "^1.0.1", + "arr-diff": "^4.0.0", + "arr-union": "^3.1.0", + "extend-shallow": "^3.0.2" + } + }, + "plur": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/plur/-/plur-3.1.1.tgz", + "integrity": "sha512-t1Ax8KUvV3FFII8ltczPn2tJdjqbd1sIzu6t4JL7nQ3EyeL/lTrj5PWKb06ic5/6XYDr65rQ4uzQEGN70/6X5w==", + "dev": true, + "requires": { + "irregular-plurals": "^2.0.0" + } + }, + "posix-character-classes": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/posix-character-classes/-/posix-character-classes-0.1.1.tgz", + "integrity": "sha1-AerA/jta9xoqbAL+q7jB/vfgDqs=", + "dev": true + }, + "prelude-ls": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/prelude-ls/-/prelude-ls-1.1.2.tgz", + "integrity": "sha1-IZMqVJ9eUv/ZqCf1cOBL5iqX2lQ=", + "dev": true + }, + "pretty-hrtime": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/pretty-hrtime/-/pretty-hrtime-1.0.3.tgz", + "integrity": "sha1-t+PqQkNaTJsnWdmeDyAesZWALuE=", + "dev": true + }, + "prex": { + "version": "0.4.7", + "resolved": "https://registry.npmjs.org/prex/-/prex-0.4.7.tgz", + "integrity": "sha512-ulhl3iyjmAW/GroRQJN4CG+pC6KJ+W+deNRBkEShQwe16wLP9k92+x6RmLJuLiVSGkbxhnAqHpGdJJCh3bRpUQ==", + "dev": true, + "requires": { + "@esfx/cancelable": "^1.0.0-pre.13", + "@esfx/disposable": "^1.0.0-pre.13" + } + }, + "process": { + "version": "0.11.10", + "resolved": "https://registry.npmjs.org/process/-/process-0.11.10.tgz", + "integrity": "sha1-czIwDoQBYb2j5podHZGn1LwW8YI=", + "dev": true + }, + "process-nextick-args": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/process-nextick-args/-/process-nextick-args-2.0.1.tgz", + "integrity": "sha512-3ouUOpQhtgrbOa17J7+uxOTpITYWaGP7/AhoR3+A+/1e9skrzelGi/dXzEYyvbxubEF6Wn2ypscTKiKJFFn1ag==", + "dev": true + }, + "progress": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/progress/-/progress-2.0.3.tgz", + "integrity": "sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA==", + "dev": true + }, + "promise.allsettled": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/promise.allsettled/-/promise.allsettled-1.0.2.tgz", + "integrity": "sha512-UpcYW5S1RaNKT6pd+s9jp9K9rlQge1UXKskec0j6Mmuq7UJCvlS2J2/s/yuPN8ehftf9HXMxWlKiPbGGUzpoRg==", + "dev": true, + "requires": { + "array.prototype.map": "^1.0.1", + "define-properties": "^1.1.3", + "es-abstract": "^1.17.0-next.1", + "function-bind": "^1.1.1", + "iterate-value": "^1.0.0" + } + }, + "public-encrypt": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/public-encrypt/-/public-encrypt-4.0.3.tgz", + "integrity": "sha512-zVpa8oKZSz5bTMTFClc1fQOnyyEzpl5ozpi1B5YcvBrdohMjH2rfsBtyXcuNuwjsDIXmBYlF2N5FlJYhR29t8Q==", + "dev": true, + "requires": { + "bn.js": "^4.1.0", + "browserify-rsa": "^4.0.0", + "create-hash": "^1.1.0", + "parse-asn1": "^5.0.0", + "randombytes": "^2.0.1", + "safe-buffer": "^5.1.2" + }, + "dependencies": { + "bn.js": { + "version": "4.11.9", + "resolved": "https://registry.npmjs.org/bn.js/-/bn.js-4.11.9.tgz", + "integrity": "sha512-E6QoYqCKZfgatHTdHzs1RRKP7ip4vvm+EyRUeE2RF0NblwVvb0p6jSVeNTOFxPn26QXN2o6SMfNxKp6kU8zQaw==", + "dev": true + } + } + }, + "pump": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pump/-/pump-2.0.1.tgz", + "integrity": "sha512-ruPMNRkN3MHP1cWJc9OWr+T/xDP0jhXYCLfJcBuX54hhfIBnaQmAUMfDcG4DM5UMWByBbJY69QSphm3jtDKIkA==", + "dev": true, + "requires": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "pumpify": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/pumpify/-/pumpify-1.5.1.tgz", + "integrity": "sha512-oClZI37HvuUJJxSKKrC17bZ9Cu0ZYhEAGPsPUy9KlMUmv9dKX2o77RUmq7f3XjIxbwyGwYzbzQ1L2Ks8sIradQ==", + "dev": true, + "requires": { + "duplexify": "^3.6.0", + "inherits": "^2.0.3", + "pump": "^2.0.0" + } + }, + "punycode": { + "version": "1.4.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=", + "dev": true + }, + "q": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/q/-/q-1.5.1.tgz", + "integrity": "sha1-fjL3W0E4EpHQRhHxvxQQmsAGUdc=", + "dev": true + }, + "qs": { + "version": "6.9.4", + "resolved": "https://registry.npmjs.org/qs/-/qs-6.9.4.tgz", + "integrity": "sha512-A1kFqHekCTM7cz0udomYUoYNWjBebHm/5wzU/XqrBRBNWectVH0QIiN+NEcZ0Dte5hvzHwbr8+XQmguPhJ6WdQ==", + "dev": true + }, + "querystring": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/querystring/-/querystring-0.2.0.tgz", + "integrity": "sha1-sgmEkgO7Jd+CDadW50cAWHhSFiA=", + "dev": true + }, + "querystring-es3": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/querystring-es3/-/querystring-es3-0.2.1.tgz", + "integrity": "sha1-nsYfeQSYdXB9aUFFlv2Qek1xHnM=", + "dev": true + }, + "randombytes": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz", + "integrity": "sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==", + "dev": true, + "requires": { + "safe-buffer": "^5.1.0" + } + }, + "randomfill": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/randomfill/-/randomfill-1.0.4.tgz", + "integrity": "sha512-87lcbR8+MhcWcUiQ+9e+Rwx8MyR2P7qnt15ynUlbm3TU/fjbgz4GsvfSUDTemtCCtVCqb4ZcEFlyPNTh9bBTLw==", + "dev": true, + "requires": { + "randombytes": "^2.0.5", + "safe-buffer": "^5.1.0" + } + }, + "read-only-stream": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-only-stream/-/read-only-stream-2.0.0.tgz", + "integrity": "sha1-JyT9aoET1zdkrCiNQ4YnDB2/F/A=", + "dev": true, + "requires": { + "readable-stream": "^2.0.2" + } + }, + "read-pkg": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-2.0.0.tgz", + "integrity": "sha1-jvHAYjxqbbDcZxPEv6xGMysjaPg=", + "dev": true, + "requires": { + "load-json-file": "^2.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^2.0.0" + }, + "dependencies": { + "path-type": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-2.0.0.tgz", + "integrity": "sha1-8BLMuEFbcJb8LaoQVMPXI4lZTHM=", + "dev": true, + "requires": { + "pify": "^2.0.0" + } + } + } + }, + "read-pkg-up": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-2.0.0.tgz", + "integrity": "sha1-a3KoBImE4MQeeVEP1en6mbO1Sb4=", + "dev": true, + "requires": { + "find-up": "^2.0.0", + "read-pkg": "^2.0.0" + } + }, + "readable-stream": { + "version": "2.3.7", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-2.3.7.tgz", + "integrity": "sha512-Ebho8K4jIbHAxnuxi7o42OrZgF/ZTNcsZj6nRKyUmkhLFq8CHItp/fy6hQZuZmP/n3yZ9VBUbp4zz/mX8hmYPw==", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.3", + "isarray": "~1.0.0", + "process-nextick-args": "~2.0.0", + "safe-buffer": "~5.1.1", + "string_decoder": "~1.1.1", + "util-deprecate": "~1.0.1" + } + }, + "readdirp": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-2.2.1.tgz", + "integrity": "sha512-1JU/8q+VgFZyxwrJ+SVIOsh+KywWGpds3NTqikiKpDMZWScmAYyKIgqkO+ARvNWJfXeXR1zxz7aHF4u4CyH6vQ==", + "dev": true, + "requires": { + "graceful-fs": "^4.1.11", + "micromatch": "^3.1.10", + "readable-stream": "^2.0.2" + } + }, + "rechoir": { + "version": "0.6.2", + "resolved": "https://registry.npmjs.org/rechoir/-/rechoir-0.6.2.tgz", + "integrity": "sha1-hSBLVNuoLVdC4oyWdW70OvUOM4Q=", + "dev": true, + "requires": { + "resolve": "^1.1.6" + } + }, + "regex-not": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/regex-not/-/regex-not-1.0.2.tgz", + "integrity": "sha512-J6SDjUgDxQj5NusnOtdFxDwN/+HWykR8GELwctJ7mdqhcyy1xEc4SRFHUXvxTp661YaVKAjfRLZ9cCqS6tn32A==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.2", + "safe-regex": "^1.1.0" + } + }, + "regexpp": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/regexpp/-/regexpp-3.1.0.tgz", + "integrity": "sha512-ZOIzd8yVsQQA7j8GCSlPGXwg5PfmA1mrq0JP4nGhh54LaKN3xdai/vHUDu74pKwV8OxseMS65u2NImosQcSD0Q==", + "dev": true + }, + "regextras": { + "version": "0.7.1", + "resolved": "https://registry.npmjs.org/regextras/-/regextras-0.7.1.tgz", + "integrity": "sha512-9YXf6xtW+qzQ+hcMQXx95MOvfqXFgsKDZodX3qZB0x2n5Z94ioetIITsBtvJbiOyxa/6s9AtyweBLCdPmPko/w==", + "dev": true + }, + "remove-bom-buffer": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/remove-bom-buffer/-/remove-bom-buffer-3.0.0.tgz", + "integrity": "sha512-8v2rWhaakv18qcvNeli2mZ/TMTL2nEyAKRvzo1WtnZBl15SHyEhrCu2/xKlJyUFKHiHgfXIyuY6g2dObJJycXQ==", + "dev": true, + "requires": { + "is-buffer": "^1.1.5", + "is-utf8": "^0.2.1" + } + }, + "remove-bom-stream": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/remove-bom-stream/-/remove-bom-stream-1.2.0.tgz", + "integrity": "sha1-BfGlk/FuQuH7kOv1nejlaVJflSM=", + "dev": true, + "requires": { + "remove-bom-buffer": "^3.0.0", + "safe-buffer": "^5.1.0", + "through2": "^2.0.3" + }, + "dependencies": { + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "remove-internal": { + "version": "2.9.3", + "resolved": "https://registry.npmjs.org/remove-internal/-/remove-internal-2.9.3.tgz", + "integrity": "sha512-mUMTsHx6SAFWUXYqkOsR1BlVRQJW/oQdmFFDyVVuPLri6MLpeqtwt15TyYG55GcyysMVpul8nYGxIRyGjuEJxA==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1", + "typescript": "^2.9.1", + "yargs": "^11.0.0" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "camelcase": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-4.1.0.tgz", + "integrity": "sha1-1UVjW+HjPFQmScaRc+Xeas+uNN0=", + "dev": true + }, + "cliui": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-4.1.0.tgz", + "integrity": "sha512-4FG+RSG9DL7uEwRUZXZn3SS34DiDPfzP0VOiEwtUWlE+AR2EIg+hSyvrIgUUfhdgR/UkAeW2QHgeP+hWrXs7jQ==", + "dev": true, + "requires": { + "string-width": "^2.1.1", + "strip-ansi": "^4.0.0", + "wrap-ansi": "^2.0.0" + } + }, + "invert-kv": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/invert-kv/-/invert-kv-2.0.0.tgz", + "integrity": "sha512-wPVv/y/QQ/Uiirj/vh3oP+1Ww+AWehmi1g5fFWGPF6IpCBCDVrhgHRMvrLfdYcwDh3QJbGXDW4JAuzxElLSqKA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "lcid": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/lcid/-/lcid-2.0.0.tgz", + "integrity": "sha512-avPEb8P8EGnwXKClwsNUgryVjllcRqtMYa49NTsbQagYuT1DcXnl1915oxWjoyGrXR6zH/Y0Zc96xWsPcoDKeA==", + "dev": true, + "requires": { + "invert-kv": "^2.0.0" + } + }, + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + }, + "os-locale": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/os-locale/-/os-locale-3.1.0.tgz", + "integrity": "sha512-Z8l3R4wYWM40/52Z+S265okfFj8Kt2cC2MKY+xNi3kFs+XGI7WXu/I309QQQYbRW4ijiZ+yxs9pqEhJh0DqW3Q==", + "dev": true, + "requires": { + "execa": "^1.0.0", + "lcid": "^2.0.0", + "mem": "^4.0.0" + } + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + }, + "typescript": { + "version": "2.9.2", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-2.9.2.tgz", + "integrity": "sha512-Gr4p6nFNaoufRIY4NMdpQRNmgxVIGMs4Fcu/ujdYk3nAZqk7supzBE9idmvfZIlH/Cuj//dvi+019qEue9lV0w==", + "dev": true + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "yargs": { + "version": "11.1.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-11.1.1.tgz", + "integrity": "sha512-PRU7gJrJaXv3q3yQZ/+/X6KBswZiaQ+zOmdprZcouPYtQgvNU35i+68M4b1ZHLZtYFT5QObFLV+ZkmJYcwKdiw==", + "dev": true, + "requires": { + "cliui": "^4.0.0", + "decamelize": "^1.1.1", + "find-up": "^2.1.0", + "get-caller-file": "^1.0.1", + "os-locale": "^3.1.0", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^2.0.0", + "which-module": "^2.0.0", + "y18n": "^3.2.1", + "yargs-parser": "^9.0.2" + } + }, + "yargs-parser": { + "version": "9.0.2", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-9.0.2.tgz", + "integrity": "sha1-nM9qQ0YP5O1Aqbto9I1DuKaMwHc=", + "dev": true, + "requires": { + "camelcase": "^4.1.0" + } + } + } + }, + "remove-trailing-separator": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/remove-trailing-separator/-/remove-trailing-separator-1.1.0.tgz", + "integrity": "sha1-wkvOKig62tW8P1jg1IJJuSN52O8=", + "dev": true + }, + "repeat-element": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/repeat-element/-/repeat-element-1.1.3.tgz", + "integrity": "sha512-ahGq0ZnV5m5XtZLMb+vP76kcAM5nkLqk0lpqAuojSKGgQtn4eRi4ZZGm2olo2zKFH+sMsWaqOCW1dqAnOru72g==", + "dev": true + }, + "repeat-string": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/repeat-string/-/repeat-string-1.6.1.tgz", + "integrity": "sha1-jcrkcOHIirwtYA//Sndihtp15jc=", + "dev": true + }, + "replace-ext": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/replace-ext/-/replace-ext-1.0.1.tgz", + "integrity": "sha512-yD5BHCe7quCgBph4rMQ+0KkIRKwWCrHDOX1p1Gp6HwjPM5kVoCdKGNhN7ydqqsX6lJEnQDKZ/tFMiEdQ1dvPEw==", + "dev": true + }, + "replace-homedir": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/replace-homedir/-/replace-homedir-1.0.0.tgz", + "integrity": "sha1-6H9tUTuSjd6AgmDBK+f+xv9ueYw=", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1", + "is-absolute": "^1.0.0", + "remove-trailing-separator": "^1.1.0" + } + }, + "require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha1-jGStX9MNqxyXbiNE/+f3kqam30I=", + "dev": true + }, + "require-main-filename": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-1.0.1.tgz", + "integrity": "sha1-l/cXtp1IeE9fUmpsWqj/3aBVpNE=", + "dev": true + }, + "resolve": { + "version": "1.1.7", + "resolved": "https://registry.npmjs.org/resolve/-/resolve-1.1.7.tgz", + "integrity": "sha1-IDEU2CrSxe2ejgQRs5ModeiJ6Xs=", + "dev": true + }, + "resolve-dir": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/resolve-dir/-/resolve-dir-1.0.1.tgz", + "integrity": "sha1-eaQGRMNivoLybv/nOcm7U4IEb0M=", + "dev": true, + "requires": { + "expand-tilde": "^2.0.0", + "global-modules": "^1.0.0" + } + }, + "resolve-from": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/resolve-from/-/resolve-from-4.0.0.tgz", + "integrity": "sha512-pb/MYmXstAkysRFx8piNI1tGFNQIFA3vkE3Gq4EuA1dF6gHp/+vgZqsCGJapvy8N3Q+4o7FwvquPJcnZ7RYy4g==", + "dev": true + }, + "resolve-options": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/resolve-options/-/resolve-options-1.1.0.tgz", + "integrity": "sha1-MrueOcBtZzONyTeMDW1gdFZq0TE=", + "dev": true, + "requires": { + "value-or-function": "^3.0.0" + } + }, + "resolve-url": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/resolve-url/-/resolve-url-0.2.1.tgz", + "integrity": "sha1-LGN/53yJOv0qZj/iGqkIAGjiBSo=", + "dev": true + }, + "restore-cursor": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/restore-cursor/-/restore-cursor-3.1.0.tgz", + "integrity": "sha512-l+sSefzHpj5qimhFSE5a8nufZYAM3sBSVMAPtYkmC+4EH2anSGaEMXSD0izRQbu9nfyQ9y5JrVmp7E8oZrUjvA==", + "dev": true, + "requires": { + "onetime": "^5.1.0", + "signal-exit": "^3.0.2" + } + }, + "ret": { + "version": "0.1.15", + "resolved": "https://registry.npmjs.org/ret/-/ret-0.1.15.tgz", + "integrity": "sha512-TTlYpa+OL+vMMNG24xSlQGEJ3B/RzEfUlLct7b5G/ytav+wPrplCpVMFuwzXbkecJrb6IYo1iFb0S9v37754mg==", + "dev": true + }, + "reusify": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/reusify/-/reusify-1.0.4.tgz", + "integrity": "sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==", + "dev": true + }, + "rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "dev": true, + "requires": { + "glob": "^7.1.3" + } + }, + "ripemd160": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/ripemd160/-/ripemd160-2.0.2.tgz", + "integrity": "sha512-ii4iagi25WusVoiC4B4lq7pbXfAp3D9v5CwfkY33vffw2+pkDjY1D8GaN7spsxvCSx8dkPqOZCEZyfxcmJG2IA==", + "dev": true, + "requires": { + "hash-base": "^3.0.0", + "inherits": "^2.0.1" + } + }, + "run-async": { + "version": "2.4.1", + "resolved": "https://registry.npmjs.org/run-async/-/run-async-2.4.1.tgz", + "integrity": "sha512-tvVnVv01b8c1RrA6Ep7JkStj85Guv/YrMcwqYQnwjsAS2cTmmPGBBjAjpCW7RrSodNSoE2/qg9O4bceNvUuDgQ==", + "dev": true + }, + "run-parallel": { + "version": "1.1.9", + "resolved": "https://registry.npmjs.org/run-parallel/-/run-parallel-1.1.9.tgz", + "integrity": "sha512-DEqnSRTDw/Tc3FXf49zedI638Z9onwUotBMiUFKmrO2sdFKIbXamXGQ3Axd4qgphxKB4kw/qP1w5kTxnfU1B9Q==", + "dev": true + }, + "rxjs": { + "version": "6.6.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-6.6.2.tgz", + "integrity": "sha512-BHdBMVoWC2sL26w//BCu3YzKT4s2jip/WhwsGEDmeKYBhKDZeYezVUnHatYB7L85v5xs0BAQmg6BEYJEKxBabg==", + "dev": true, + "requires": { + "tslib": "^1.9.0" + } + }, + "safe-buffer": { + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.1.2.tgz", + "integrity": "sha512-Gd2UZBJDkXlY7GbJxfsE8/nvKkUEU1G38c1siN6QP6a9PT9MmHB8GnpscSmMJSoF8LOIrt8ud/wPtojys4G6+g==", + "dev": true + }, + "safe-regex": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/safe-regex/-/safe-regex-1.1.0.tgz", + "integrity": "sha1-QKNmnzsHfR6UPURinhV91IAjvy4=", + "dev": true, + "requires": { + "ret": "~0.1.10" + } + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", + "integrity": "sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==", + "dev": true + }, + "sax": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", + "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", + "dev": true + }, + "semver": { + "version": "7.3.2", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.2.tgz", + "integrity": "sha512-OrOb32TeeambH6UrhtShmF7CRDqhL6/5XpPNp2DuRH6+9QLw/orhp72j87v8Qa1ScDkvrrBNpZcDejAirJmfXQ==", + "dev": true + }, + "semver-greatest-satisfied-range": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/semver-greatest-satisfied-range/-/semver-greatest-satisfied-range-1.1.0.tgz", + "integrity": "sha1-E+jCZYq5aRywzXEJMkAoDTb3els=", + "dev": true, + "requires": { + "sver-compat": "^1.5.0" + } + }, + "serialize-javascript": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-4.0.0.tgz", + "integrity": "sha512-GaNA54380uFefWghODBWEGisLZFj00nS5ACs6yHa9nLqlLpVLO8ChDGeKRjZnV4Nh4n0Qi7nhYZD/9fCPzEqkw==", + "dev": true, + "requires": { + "randombytes": "^2.1.0" + } + }, + "set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha1-BF+XgtARrppoA93TgrJDkrPYkPc=", + "dev": true + }, + "set-value": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/set-value/-/set-value-2.0.1.tgz", + "integrity": "sha512-JxHc1weCN68wRY0fhCoXpyK55m/XPHafOmK4UWD7m2CI14GMcFypt4w/0+NV5f/ZMby2F6S2wwA7fgynh9gWSw==", + "dev": true, + "requires": { + "extend-shallow": "^2.0.1", + "is-extendable": "^0.1.1", + "is-plain-object": "^2.0.3", + "split-string": "^3.0.1" + }, + "dependencies": { + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + }, + "is-plain-object": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/is-plain-object/-/is-plain-object-2.0.4.tgz", + "integrity": "sha512-h5PpgXkWitc38BBMYawTYMWJHFZJVnBquFE57xFpjB8pJFiF6gZ+bU+WyI/yqXiFR5mdLsgYNaPe8uao6Uv9Og==", + "dev": true, + "requires": { + "isobject": "^3.0.1" + } + } + } + }, + "sha.js": { + "version": "2.4.11", + "resolved": "https://registry.npmjs.org/sha.js/-/sha.js-2.4.11.tgz", + "integrity": "sha512-QMEp5B7cftE7APOjk5Y6xgrbWu+WkLVQwk8JNjZ8nKRciZaByEW6MubieAiToS7+dwvrjGhH8jRXz3MVd0AYqQ==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "safe-buffer": "^5.0.1" + } + }, + "shasum": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/shasum/-/shasum-1.0.2.tgz", + "integrity": "sha1-5wEjENj0F/TetXEhUOVni4euVl8=", + "dev": true, + "requires": { + "json-stable-stringify": "~0.0.0", + "sha.js": "~2.4.4" + } + }, + "shasum-object": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shasum-object/-/shasum-object-1.0.0.tgz", + "integrity": "sha512-Iqo5rp/3xVi6M4YheapzZhhGPVs0yZwHj7wvwQ1B9z8H6zk+FEnI7y3Teq7qwnekfEhu8WmG2z0z4iWZaxLWVg==", + "dev": true, + "requires": { + "fast-safe-stringify": "^2.0.7" + } + }, + "shebang-command": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-1.2.0.tgz", + "integrity": "sha1-RKrGW2lbAzmJaMOfNj/uXer98eo=", + "dev": true, + "requires": { + "shebang-regex": "^1.0.0" + } + }, + "shebang-regex": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-1.0.0.tgz", + "integrity": "sha1-2kL0l0DAtC2yypcoVxyxkMmO/qM=", + "dev": true + }, + "shell-quote": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.7.2.tgz", + "integrity": "sha512-mRz/m/JVscCrkMyPqHc/bczi3OQHkLTqXHEFu0zDhK/qfv3UcOA4SVmRCLmos4bhjr9ekVQubj/R7waKapmiQg==", + "dev": true + }, + "signal-exit": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/signal-exit/-/signal-exit-3.0.3.tgz", + "integrity": "sha512-VUJ49FC8U1OxwZLxIbTTrDvLnf/6TDgxZcK8wxR8zs13xpx7xbG60ndBlhNrFi2EMuFRoeDoJO7wthSLq42EjA==", + "dev": true + }, + "simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true + }, + "slash": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/slash/-/slash-3.0.0.tgz", + "integrity": "sha512-g9Q1haeby36OSStwb4ntCGGGaKsaVSjQ68fBxoQcutl5fS1vuY18H3wSt3jFyFtrkx+Kz0V1G85A4MyAdDMi2Q==", + "dev": true + }, + "slice-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/slice-ansi/-/slice-ansi-2.1.0.tgz", + "integrity": "sha512-Qu+VC3EwYLldKa1fCxuuvULvSJOKEgk9pi8dZeCVK7TqBfUNTH4sFkk4joj8afVSfAYgJoSOetjx9QWOJ5mYoQ==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "astral-regex": "^1.0.0", + "is-fullwidth-code-point": "^2.0.0" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + } + } + }, + "snapdragon": { + "version": "0.8.2", + "resolved": "https://registry.npmjs.org/snapdragon/-/snapdragon-0.8.2.tgz", + "integrity": "sha512-FtyOnWN/wCHTVXOMwvSv26d+ko5vWlIDD6zoUJ7LW8vh+ZBC8QdljveRP+crNrtBwioEUWy/4dMtbBjA4ioNlg==", + "dev": true, + "requires": { + "base": "^0.11.1", + "debug": "^2.2.0", + "define-property": "^0.2.5", + "extend-shallow": "^2.0.1", + "map-cache": "^0.2.2", + "source-map": "^0.5.6", + "source-map-resolve": "^0.5.0", + "use": "^3.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + }, + "extend-shallow": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/extend-shallow/-/extend-shallow-2.0.1.tgz", + "integrity": "sha1-Ua99YUrZqfYQ6huvu5idaxxWiQ8=", + "dev": true, + "requires": { + "is-extendable": "^0.1.0" + } + } + } + }, + "snapdragon-node": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/snapdragon-node/-/snapdragon-node-2.1.1.tgz", + "integrity": "sha512-O27l4xaMYt/RSQ5TR3vpWCAB5Kb/czIcqUFOM/C4fYcLnbZUc1PkjTAMjof2pBWaSTwOUd6qUHcFGVGj7aIwnw==", + "dev": true, + "requires": { + "define-property": "^1.0.0", + "isobject": "^3.0.0", + "snapdragon-util": "^3.0.1" + }, + "dependencies": { + "define-property": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-1.0.0.tgz", + "integrity": "sha1-dp66rz9KY6rTr56NMEybvnm/sOY=", + "dev": true, + "requires": { + "is-descriptor": "^1.0.0" + } + }, + "is-accessor-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-accessor-descriptor/-/is-accessor-descriptor-1.0.0.tgz", + "integrity": "sha512-m5hnHTkcVsPfqx3AKlyttIPb7J+XykHvJP2B9bZDjlhLIoEq4XoK64Vg7boZlVWYK6LUY94dYPEE7Lh0ZkZKcQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-data-descriptor": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-data-descriptor/-/is-data-descriptor-1.0.0.tgz", + "integrity": "sha512-jbRXy1FmtAoCjQkVmIVYwuuqDFUbaOeDjmed1tOGPrsMhtJA4rD9tkgA0F1qJ3gRFRXcHYVkdeaP50Q5rE/jLQ==", + "dev": true, + "requires": { + "kind-of": "^6.0.0" + } + }, + "is-descriptor": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/is-descriptor/-/is-descriptor-1.0.2.tgz", + "integrity": "sha512-2eis5WqQGV7peooDyLmNEPUrps9+SXX5c9pL3xEB+4e9HnGuDa7mB7kHxHw4CbqS9k1T2hOH3miL8n8WtiYVtg==", + "dev": true, + "requires": { + "is-accessor-descriptor": "^1.0.0", + "is-data-descriptor": "^1.0.0", + "kind-of": "^6.0.2" + } + } + } + }, + "snapdragon-util": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/snapdragon-util/-/snapdragon-util-3.0.1.tgz", + "integrity": "sha512-mbKkMdQKsjX4BAL4bRYTj21edOf8cN7XHdYUJEe+Zn99hVEYcMvKPct1IqNe7+AZPirn8BCDOQBHQZknqmKlZQ==", + "dev": true, + "requires": { + "kind-of": "^3.2.0" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "source-map": { + "version": "0.5.7", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.5.7.tgz", + "integrity": "sha1-igOdLRAh0i0eoUyA2OpGi6LvP8w=", + "dev": true + }, + "source-map-resolve": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/source-map-resolve/-/source-map-resolve-0.5.3.tgz", + "integrity": "sha512-Htz+RnsXWk5+P2slx5Jh3Q66vhQj1Cllm0zvnaY98+NFx+Dv2CF/f5O/t8x+KaNdrdIAsruNzoh/KpialbqAnw==", + "dev": true, + "requires": { + "atob": "^2.1.2", + "decode-uri-component": "^0.2.0", + "resolve-url": "^0.2.1", + "source-map-url": "^0.4.0", + "urix": "^0.1.0" + } + }, + "source-map-support": { + "version": "0.5.19", + "resolved": "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.19.tgz", + "integrity": "sha512-Wonm7zOCIJzBGQdB+thsPar0kYuCIzYvxZwlBa87yi/Mdjv7Tip2cyVbLj5o0cFPN4EVkuTwb3GDDyUx2DGnGw==", + "dev": true, + "requires": { + "buffer-from": "^1.0.0", + "source-map": "^0.6.0" + }, + "dependencies": { + "source-map": { + "version": "0.6.1", + "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz", + "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==", + "dev": true + } + } + }, + "source-map-url": { + "version": "0.4.0", + "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.0.tgz", + "integrity": "sha1-PpNdfd1zYxuXZZlW1VEo6HtQhKM=", + "dev": true + }, + "sparkles": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/sparkles/-/sparkles-1.0.1.tgz", + "integrity": "sha512-dSO0DDYUahUt/0/pD/Is3VIm5TGJjludZ0HVymmhYF6eNA53PVLhnUk0znSYbH8IYBuJdCE+1luR22jNLMaQdw==", + "dev": true + }, + "spdx-correct": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/spdx-correct/-/spdx-correct-3.1.1.tgz", + "integrity": "sha512-cOYcUWwhCuHCXi49RhFRCyJEK3iPj1Ziz9DpViV3tbZOwXD49QzIN3MpOLJNxh2qwq2lJJZaKMVw9qNi4jTC0w==", + "dev": true, + "requires": { + "spdx-expression-parse": "^3.0.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-exceptions": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz", + "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==", + "dev": true + }, + "spdx-expression-parse": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/spdx-expression-parse/-/spdx-expression-parse-3.0.1.tgz", + "integrity": "sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==", + "dev": true, + "requires": { + "spdx-exceptions": "^2.1.0", + "spdx-license-ids": "^3.0.0" + } + }, + "spdx-license-ids": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/spdx-license-ids/-/spdx-license-ids-3.0.5.tgz", + "integrity": "sha512-J+FWzZoynJEXGphVIS+XEh3kFSjZX/1i9gFBaWQcB+/tmpe2qUsSBABpcxqxnAxFdiUFEgAX1bjYGQvIZmoz9Q==", + "dev": true + }, + "split-string": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", + "integrity": "sha512-NzNVhJDYpwceVVii8/Hu6DKfD2G+NrQHlS/V/qgv763EYudVwEcMQNxd2lh+0VrUByXN/oJkl5grOhYWvQUYiw==", + "dev": true, + "requires": { + "extend-shallow": "^3.0.0" + } + }, + "sprintf-js": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/sprintf-js/-/sprintf-js-1.0.3.tgz", + "integrity": "sha1-BOaSb2YolTVPPdAVIDYzuFcpfiw=", + "dev": true + }, + "stack-trace": { + "version": "0.0.10", + "resolved": "https://registry.npmjs.org/stack-trace/-/stack-trace-0.0.10.tgz", + "integrity": "sha1-VHxws0fo0ytOEI6hoqFZ5f3eGcA=", + "dev": true + }, + "static-extend": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/static-extend/-/static-extend-0.1.2.tgz", + "integrity": "sha1-YICcOcv/VTNyJv1eC1IPNB8ftcY=", + "dev": true, + "requires": { + "define-property": "^0.2.5", + "object-copy": "^0.1.0" + }, + "dependencies": { + "define-property": { + "version": "0.2.5", + "resolved": "https://registry.npmjs.org/define-property/-/define-property-0.2.5.tgz", + "integrity": "sha1-w1se+RjsPJkPmlvFe+BKrOxcgRY=", + "dev": true, + "requires": { + "is-descriptor": "^0.1.0" + } + } + } + }, + "stream-browserify": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/stream-browserify/-/stream-browserify-2.0.2.tgz", + "integrity": "sha512-nX6hmklHs/gr2FuxYDltq8fJA1GDlxKQCz8O/IM4atRqBH8OORmBNgfvW5gG10GT/qQ9u0CzIvr2X5Pkt6ntqg==", + "dev": true, + "requires": { + "inherits": "~2.0.1", + "readable-stream": "^2.0.2" + } + }, + "stream-combiner2": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/stream-combiner2/-/stream-combiner2-1.1.1.tgz", + "integrity": "sha1-+02KFCDqNidk4hrUeAOXvry0HL4=", + "dev": true, + "requires": { + "duplexer2": "~0.1.0", + "readable-stream": "^2.0.2" + } + }, + "stream-exhaust": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/stream-exhaust/-/stream-exhaust-1.0.2.tgz", + "integrity": "sha512-b/qaq/GlBK5xaq1yrK9/zFcyRSTNxmcZwFLGSTG0mXgZl/4Z6GgiyYOXOvY7N3eEvFRAG1bkDRz5EPGSvPYQlw==", + "dev": true + }, + "stream-http": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/stream-http/-/stream-http-3.1.1.tgz", + "integrity": "sha512-S7OqaYu0EkFpgeGFb/NPOoPLxFko7TPqtEeFg5DXPB4v/KETHG0Ln6fRFrNezoelpaDKmycEmmZ81cC9DAwgYg==", + "dev": true, + "requires": { + "builtin-status-codes": "^3.0.0", + "inherits": "^2.0.4", + "readable-stream": "^3.6.0", + "xtend": "^4.0.2" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "stream-shift": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/stream-shift/-/stream-shift-1.0.1.tgz", + "integrity": "sha512-AiisoFqQ0vbGcZgQPY1cdP2I76glaVA/RauYR4G4thNFgkTqr90yXTo4LYX60Jl+sIlPNHHdGSwo01AvbKUSVQ==", + "dev": true + }, + "stream-splicer": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/stream-splicer/-/stream-splicer-2.0.1.tgz", + "integrity": "sha512-Xizh4/NPuYSyAXyT7g8IvdJ9HJpxIGL9PjyhtywCZvvP0OPIdqyrr4dMikeuvY8xahpdKEBlBTySe583totajg==", + "dev": true, + "requires": { + "inherits": "^2.0.1", + "readable-stream": "^2.0.2" + } + }, + "streamqueue": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/streamqueue/-/streamqueue-0.0.6.tgz", + "integrity": "sha1-ZvX17JTpuK8knkrsLdH3Qb/pTeM=", + "dev": true, + "requires": { + "readable-stream": "^1.0.26-2" + }, + "dependencies": { + "isarray": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/isarray/-/isarray-0.0.1.tgz", + "integrity": "sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8=", + "dev": true + }, + "readable-stream": { + "version": "1.1.14", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-1.1.14.tgz", + "integrity": "sha1-fPTFTvZI44EwhMY23SB54WbAgdk=", + "dev": true, + "requires": { + "core-util-is": "~1.0.0", + "inherits": "~2.0.1", + "isarray": "0.0.1", + "string_decoder": "~0.10.x" + } + }, + "string_decoder": { + "version": "0.10.31", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-0.10.31.tgz", + "integrity": "sha1-YuIDvEF2bGwoyfyEMB2rHFMQ+pQ=", + "dev": true + } + } + }, + "string-width": { + "version": "4.2.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.0.tgz", + "integrity": "sha512-zUz5JD+tgqtuDjMhwIg5uFVV3dtqZ9yQJlZVfq4I01/K5Paj5UHj7VyrQOJvzawSVlKpObApbfD0Ed6yJc+1eg==", + "dev": true, + "requires": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.0" + }, + "dependencies": { + "strip-ansi": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.0.tgz", + "integrity": "sha512-AuvKTrTfQNYNIctbR1K/YGTR1756GycPsg7b9bdV9Duqur4gv6aKqHXah67Z8ImS7WEz5QVcOtlfW2rZEugt6w==", + "dev": true, + "requires": { + "ansi-regex": "^5.0.0" + } + } + } + }, + "string.prototype.trimend": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimend/-/string.prototype.trimend-1.0.1.tgz", + "integrity": "sha512-LRPxFUaTtpqYsTeNKaFOw3R4bxIzWOnbQ837QfBylo8jIxtcbK/A/sMV7Q+OAV/vWo+7s25pOE10KYSjaSO06g==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string.prototype.trimstart": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/string.prototype.trimstart/-/string.prototype.trimstart-1.0.1.tgz", + "integrity": "sha512-XxZn+QpvrBI1FOcg6dIpxUPgWCPuNXvMD72aaRaUQv1eD4e/Qy8i/hFTe0BUmD60p/QA6bh1avmuPTfNjqVWRw==", + "dev": true, + "requires": { + "define-properties": "^1.1.3", + "es-abstract": "^1.17.5" + } + }, + "string_decoder": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", + "integrity": "sha512-n/ShnvDi6FHbbVfviro+WojiFzv+s8MPMHBczVePfUpDJLwoLT0ht1l4YwBCbi8pJAveEEdnkHyPyTP/mzRfwg==", + "dev": true, + "requires": { + "safe-buffer": "~5.1.0" + } + }, + "strip-ansi": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-5.2.0.tgz", + "integrity": "sha512-DuRs1gKbBqsMKIZlrffwlug8MHkcnpjs5VPmL1PAh+mA30U0DTotfDZ0d2UUsXpPmPmMMJ6W773MaA3J+lbiWA==", + "dev": true, + "requires": { + "ansi-regex": "^4.1.0" + }, + "dependencies": { + "ansi-regex": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-4.1.0.tgz", + "integrity": "sha512-1apePfXM1UOSqw0o9IiFAovVz9M5S1Dg+4TrDwfMewQ6p/rmMueb7tWZjQ1rx4Loy1ArBggoqGpfqqdI4rondg==", + "dev": true + } + } + }, + "strip-bom": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-3.0.0.tgz", + "integrity": "sha1-IzTBjpx1n3vdVv3vfprj1YjmjtM=", + "dev": true + }, + "strip-bom-string": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-bom-string/-/strip-bom-string-1.0.0.tgz", + "integrity": "sha1-5SEekiQ2n7uB1jOi8ABE3IztrZI=", + "dev": true + }, + "strip-eof": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/strip-eof/-/strip-eof-1.0.0.tgz", + "integrity": "sha1-u0P/VZim6wXYm1n80SnJgzE2Br8=", + "dev": true + }, + "strip-json-comments": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz", + "integrity": "sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==", + "dev": true + }, + "subarg": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/subarg/-/subarg-1.0.0.tgz", + "integrity": "sha1-9izxdYHplrSPyWVpn1TAauJouNI=", + "dev": true, + "requires": { + "minimist": "^1.1.0" + } + }, + "supports-color": { + "version": "7.1.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.1.0.tgz", + "integrity": "sha512-oRSIpR8pxT1Wr2FquTNnGet79b3BWljqOuoW/h4oBhxJ/HUbX5nX6JSruTkvXDCFMwDPvsaTTbvMLKZWSy0R5g==", + "dev": true, + "requires": { + "has-flag": "^4.0.0" + } + }, + "sver-compat": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/sver-compat/-/sver-compat-1.5.0.tgz", + "integrity": "sha1-PPh9/rTQe0o/FIJ7wYaz/QxkXNg=", + "dev": true, + "requires": { + "es6-iterator": "^2.0.1", + "es6-symbol": "^3.1.1" + } + }, + "syntax-error": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/syntax-error/-/syntax-error-1.4.0.tgz", + "integrity": "sha512-YPPlu67mdnHGTup2A8ff7BC2Pjq0e0Yp/IyTFN03zWO0RcK07uLcbi7C2KpGR2FvWbaB0+bfE27a+sBKebSo7w==", + "dev": true, + "requires": { + "acorn-node": "^1.2.0" + } + }, + "table": { + "version": "5.4.6", + "resolved": "https://registry.npmjs.org/table/-/table-5.4.6.tgz", + "integrity": "sha512-wmEc8m4fjnob4gt5riFRtTu/6+4rSe12TpAELNSqHMfF3IqnA+CH37USM6/YR3qRZv7e56kAEAtd6nKZaxe0Ug==", + "dev": true, + "requires": { + "ajv": "^6.10.2", + "lodash": "^4.17.14", + "slice-ansi": "^2.1.0", + "string-width": "^3.0.0" + }, + "dependencies": { + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + } + } + }, + "text-table": { + "version": "0.2.0", + "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz", + "integrity": "sha1-f17oI66AUgfACvLfSoTsP8+lcLQ=", + "dev": true + }, + "through": { + "version": "2.3.8", + "resolved": "https://registry.npmjs.org/through/-/through-2.3.8.tgz", + "integrity": "sha1-DdTJ/6q8NXlgsbckEV1+Doai4fU=", + "dev": true + }, + "through2": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/through2/-/through2-4.0.2.tgz", + "integrity": "sha512-iOqSav00cVxEEICeD7TjLB1sueEL+81Wpzp2bY17uZjZN0pWZPuo4suZ/61VujxmqSGFfgOcNuTZ85QJwNZQpw==", + "dev": true, + "requires": { + "readable-stream": "3" + }, + "dependencies": { + "readable-stream": { + "version": "3.6.0", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", + "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", + "dev": true, + "requires": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + } + } + } + }, + "through2-filter": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/through2-filter/-/through2-filter-3.0.0.tgz", + "integrity": "sha512-jaRjI2WxN3W1V8/FMZ9HKIBXixtiqs3SQSX4/YGIiP3gL6djW48VoZq9tDqeCWs3MT8YY5wb/zli8VW8snY1CA==", + "dev": true, + "requires": { + "through2": "~2.0.0", + "xtend": "~4.0.0" + }, + "dependencies": { + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "time-stamp": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/time-stamp/-/time-stamp-1.1.0.tgz", + "integrity": "sha1-dkpaEa9QVhkhsTPztE5hhofg9cM=", + "dev": true + }, + "timers-browserify": { + "version": "1.4.2", + "resolved": "https://registry.npmjs.org/timers-browserify/-/timers-browserify-1.4.2.tgz", + "integrity": "sha1-ycWLV1voQHN1y14kYtrO50NZ9B0=", + "dev": true, + "requires": { + "process": "~0.11.0" + } + }, + "timers-ext": { + "version": "0.1.7", + "resolved": "https://registry.npmjs.org/timers-ext/-/timers-ext-0.1.7.tgz", + "integrity": "sha512-b85NUNzTSdodShTIbky6ZF02e8STtVVfD+fu4aXXShEELpozH+bCpJLYMPZbsABN2wDH7fJpqIoXxJpzbf0NqQ==", + "dev": true, + "requires": { + "es5-ext": "~0.10.46", + "next-tick": "1" + } + }, + "tmp": { + "version": "0.0.33", + "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.0.33.tgz", + "integrity": "sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==", + "dev": true, + "requires": { + "os-tmpdir": "~1.0.2" + } + }, + "to-absolute-glob": { + "version": "2.0.2", + "resolved": "https://registry.npmjs.org/to-absolute-glob/-/to-absolute-glob-2.0.2.tgz", + "integrity": "sha1-GGX0PZ50sIItufFFt4z/fQ98hJs=", + "dev": true, + "requires": { + "is-absolute": "^1.0.0", + "is-negated-glob": "^1.0.0" + } + }, + "to-object-path": { + "version": "0.3.0", + "resolved": "https://registry.npmjs.org/to-object-path/-/to-object-path-0.3.0.tgz", + "integrity": "sha1-KXWIt7Dn4KwI4E5nL4XB9JmeF68=", + "dev": true, + "requires": { + "kind-of": "^3.0.2" + }, + "dependencies": { + "kind-of": { + "version": "3.2.2", + "resolved": "https://registry.npmjs.org/kind-of/-/kind-of-3.2.2.tgz", + "integrity": "sha1-MeohpzS6ubuw8yRm2JOupR5KPGQ=", + "dev": true, + "requires": { + "is-buffer": "^1.1.5" + } + } + } + }, + "to-regex": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/to-regex/-/to-regex-3.0.2.tgz", + "integrity": "sha512-FWtleNAtZ/Ki2qtqej2CXTOayOH9bHDQF+Q48VpWyDXjbYxA4Yz8iDB31zXOBUlOHHKidDbqGVrTUvQMPmBGBw==", + "dev": true, + "requires": { + "define-property": "^2.0.2", + "extend-shallow": "^3.0.2", + "regex-not": "^1.0.2", + "safe-regex": "^1.1.0" + } + }, + "to-regex-range": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/to-regex-range/-/to-regex-range-2.1.1.tgz", + "integrity": "sha1-fIDBe53+vlmeJzZ+DU3VWQFB2zg=", + "dev": true, + "requires": { + "is-number": "^3.0.0", + "repeat-string": "^1.6.1" + } + }, + "to-through": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/to-through/-/to-through-2.0.0.tgz", + "integrity": "sha1-/JKtq6ByZHvAtn1rA2ZKoZUJOvY=", + "dev": true, + "requires": { + "through2": "^2.0.3" + }, + "dependencies": { + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "travis-fold": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/travis-fold/-/travis-fold-0.1.2.tgz", + "integrity": "sha1-/sAF+dyqJZo/lFnOWmkGq6TFRdo=", + "dev": true + }, + "tslib": { + "version": "1.13.0", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-1.13.0.tgz", + "integrity": "sha512-i/6DQjL8Xf3be4K/E6Wgpekn5Qasl1usyw++dAA35Ue5orEn65VIxOA+YvNNl9HV3qv70T7CNwjODHZrLwvd1Q==", + "dev": true + }, + "tsutils": { + "version": "3.17.1", + "resolved": "https://registry.npmjs.org/tsutils/-/tsutils-3.17.1.tgz", + "integrity": "sha512-kzeQ5B8H3w60nFY2g8cJIuH7JDpsALXySGtwGJ0p2LSjLgay3NdIpqq5SoOBe46bKDW2iq25irHCr8wjomUS2g==", + "dev": true, + "requires": { + "tslib": "^1.8.1" + } + }, + "tty-browserify": { + "version": "0.0.1", + "resolved": "https://registry.npmjs.org/tty-browserify/-/tty-browserify-0.0.1.tgz", + "integrity": "sha512-C3TaO7K81YvjCgQH9Q1S3R3P3BtN3RIM8n+OvX4il1K1zgE8ZhI0op7kClgkxtutIE8hQrcrHBXvIheqKUUCxw==", + "dev": true + }, + "tunnel": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", + "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", + "dev": true + }, + "type": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/type/-/type-1.2.0.tgz", + "integrity": "sha512-+5nt5AAniqsCnu2cEQQdpzCAh33kVx8n0VoFidKpB1dVVLAN/F+bgVOqOJqOnEnrhp222clB5p3vUlD+1QAnfg==", + "dev": true + }, + "type-check": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/type-check/-/type-check-0.3.2.tgz", + "integrity": "sha1-WITKtRLPHTVeP7eE8wgEsrUg23I=", + "dev": true, + "requires": { + "prelude-ls": "~1.1.2" + } + }, + "type-detect": { + "version": "4.0.8", + "resolved": "https://registry.npmjs.org/type-detect/-/type-detect-4.0.8.tgz", + "integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==", + "dev": true + }, + "type-fest": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.8.1.tgz", + "integrity": "sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==", + "dev": true + }, + "typed-rest-client": { + "version": "1.7.3", + "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.7.3.tgz", + "integrity": "sha512-CwTpx/TkRHGZoHkJhBcp4X8K3/WtlzSHVQR0OIFnt10j4tgy4ypgq/SrrgVpA1s6tAL49Q6J3R5C0Cgfh2ddqA==", + "dev": true, + "requires": { + "qs": "^6.9.1", + "tunnel": "0.0.6", + "underscore": "1.8.3" + } + }, + "typedarray": { + "version": "0.0.6", + "resolved": "https://registry.npmjs.org/typedarray/-/typedarray-0.0.6.tgz", + "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", + "dev": true + }, + "typescript": { + "version": "4.0.0-dev.20200803", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.0.0-dev.20200803.tgz", + "integrity": "sha512-f/jDkFqCs0gbUd5MCUijO9u3AOMx1x1HdRDDHSidlc6uPVEkRduxjeTFhIXbGutO7ivzv+aC2sxH+1FQwsyBcg==", + "dev": true + }, + "uglify-js": { + "version": "3.11.0", + "resolved": "https://registry.npmjs.org/uglify-js/-/uglify-js-3.11.0.tgz", + "integrity": "sha512-e1KQFRCpOxnrJsJVqDUCjURq+wXvIn7cK2sRAx9XL3HYLL9aezOP4Pb1+Y3/o693EPk111Yj2Q+IUXxcpHlygQ==", + "dev": true, + "optional": true + }, + "umd": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/umd/-/umd-3.0.3.tgz", + "integrity": "sha512-4IcGSufhFshvLNcMCV80UnQVlZ5pMOC8mvNPForqwA4+lzYQuetTESLDQkeLmihq8bRcnpbQa48Wb8Lh16/xow==", + "dev": true + }, + "unc-path-regex": { + "version": "0.1.2", + "resolved": "https://registry.npmjs.org/unc-path-regex/-/unc-path-regex-0.1.2.tgz", + "integrity": "sha1-5z3T17DXxe2G+6xrCufYxqadUPo=", + "dev": true + }, + "undeclared-identifiers": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/undeclared-identifiers/-/undeclared-identifiers-1.1.3.tgz", + "integrity": "sha512-pJOW4nxjlmfwKApE4zvxLScM/njmwj/DiUBv7EabwE4O8kRUy+HIwxQtZLBPll/jx1LJyBcqNfB3/cpv9EZwOw==", + "dev": true, + "requires": { + "acorn-node": "^1.3.0", + "dash-ast": "^1.0.0", + "get-assigned-identifiers": "^1.2.0", + "simple-concat": "^1.0.0", + "xtend": "^4.0.1" + } + }, + "underscore": { + "version": "1.8.3", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.8.3.tgz", + "integrity": "sha1-Tz+1OxBuYJf8+ctBCfKl6b36UCI=", + "dev": true + }, + "undertaker": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/undertaker/-/undertaker-1.3.0.tgz", + "integrity": "sha512-/RXwi5m/Mu3H6IHQGww3GNt1PNXlbeCuclF2QYR14L/2CHPz3DFZkvB5hZ0N/QUkiXWCACML2jXViIQEQc2MLg==", + "dev": true, + "requires": { + "arr-flatten": "^1.0.1", + "arr-map": "^2.0.0", + "bach": "^1.0.0", + "collection-map": "^1.0.0", + "es6-weak-map": "^2.0.1", + "fast-levenshtein": "^1.0.0", + "last-run": "^1.1.0", + "object.defaults": "^1.0.0", + "object.reduce": "^1.0.0", + "undertaker-registry": "^1.0.0" + }, + "dependencies": { + "fast-levenshtein": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/fast-levenshtein/-/fast-levenshtein-1.1.4.tgz", + "integrity": "sha1-5qdUzI8V5YmHqpy9J69m/W9OWvk=", + "dev": true + } + } + }, + "undertaker-registry": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/undertaker-registry/-/undertaker-registry-1.0.1.tgz", + "integrity": "sha1-XkvaMI5KiirlhPm5pDWaSZglzFA=", + "dev": true + }, + "union-value": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/union-value/-/union-value-1.0.1.tgz", + "integrity": "sha512-tJfXmxMeWYnczCVs7XAEvIV7ieppALdyepWMkHkwciRpZraG/xwT+s2JN8+pr1+8jCRf80FFzvr+MpQeeoF4Xg==", + "dev": true, + "requires": { + "arr-union": "^3.1.0", + "get-value": "^2.0.6", + "is-extendable": "^0.1.1", + "set-value": "^2.0.1" + } + }, + "unique-stream": { + "version": "2.3.1", + "resolved": "https://registry.npmjs.org/unique-stream/-/unique-stream-2.3.1.tgz", + "integrity": "sha512-2nY4TnBE70yoxHkDli7DMazpWiP7xMdCYqU2nBRO0UB+ZpEkGsSija7MvmvnZFUeC+mrgiUfcHSr3LmRFIg4+A==", + "dev": true, + "requires": { + "json-stable-stringify-without-jsonify": "^1.0.1", + "through2-filter": "^3.0.0" + } + }, + "universal-user-agent": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/universal-user-agent/-/universal-user-agent-6.0.0.tgz", + "integrity": "sha512-isyNax3wXoKaulPDZWHQqbmIx1k2tb9fb3GGDBRxCscfYV2Ch7WxPArBsFEG8s/safwXTT7H4QGhaIkTp9447w==", + "dev": true + }, + "universalify": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/universalify/-/universalify-1.0.0.tgz", + "integrity": "sha512-rb6X1W158d7pRQBg5gkR8uPaSfiids68LTJQYOtEUhoJUWBdaQHsuT/EUduxXYxcrt4r5PJ4fuHW1MHT6p0qug==", + "dev": true + }, + "unset-value": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/unset-value/-/unset-value-1.0.0.tgz", + "integrity": "sha1-g3aHP30jNRef+x5vw6jtDfyKtVk=", + "dev": true, + "requires": { + "has-value": "^0.3.1", + "isobject": "^3.0.0" + }, + "dependencies": { + "has-value": { + "version": "0.3.1", + "resolved": "https://registry.npmjs.org/has-value/-/has-value-0.3.1.tgz", + "integrity": "sha1-ex9YutpiyoJ+wKIHgCVlSEWZXh8=", + "dev": true, + "requires": { + "get-value": "^2.0.3", + "has-values": "^0.1.4", + "isobject": "^2.0.0" + }, + "dependencies": { + "isobject": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/isobject/-/isobject-2.1.0.tgz", + "integrity": "sha1-8GVWEJaj8dou9GJy+BXIQNh+DIk=", + "dev": true, + "requires": { + "isarray": "1.0.0" + } + } + } + }, + "has-values": { + "version": "0.1.4", + "resolved": "https://registry.npmjs.org/has-values/-/has-values-0.1.4.tgz", + "integrity": "sha1-bWHeldkd/Km5oCCJrThL/49it3E=", + "dev": true + } + } + }, + "upath": { + "version": "1.2.0", + "resolved": "https://registry.npmjs.org/upath/-/upath-1.2.0.tgz", + "integrity": "sha512-aZwGpamFO61g3OlfT7OQCHqhGnW43ieH9WZeP7QxN/G/jS4jfqUkZxoryvJgVPEcrl5NL/ggHsSmLMHuH64Lhg==", + "dev": true + }, + "uri-js": { + "version": "4.2.2", + "resolved": "https://registry.npmjs.org/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "dev": true, + "requires": { + "punycode": "^2.1.0" + }, + "dependencies": { + "punycode": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.1.1.tgz", + "integrity": "sha512-XRsRjdf+j5ml+y/6GKHPZbrF/8p2Yga0JPtdqTIY2Xe5ohJPD9saDJJLPvp9+NSBprVvevdXZybnj2cv8OEd0A==", + "dev": true + } + } + }, + "urix": { + "version": "0.1.0", + "resolved": "https://registry.npmjs.org/urix/-/urix-0.1.0.tgz", + "integrity": "sha1-2pN/emLiH+wf0Y1Js1wpNQZ6bHI=", + "dev": true + }, + "url": { + "version": "0.11.0", + "resolved": "https://registry.npmjs.org/url/-/url-0.11.0.tgz", + "integrity": "sha1-ODjpfPxgUh63PFJajlW/3Z4uKPE=", + "dev": true, + "requires": { + "punycode": "1.3.2", + "querystring": "0.2.0" + }, + "dependencies": { + "punycode": { + "version": "1.3.2", + "resolved": "https://registry.npmjs.org/punycode/-/punycode-1.3.2.tgz", + "integrity": "sha1-llOgNvt8HuQjQvIyXM7v6jkmxI0=", + "dev": true + } + } + }, + "use": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/use/-/use-3.1.1.tgz", + "integrity": "sha512-cwESVXlO3url9YWlFW/TA9cshCEhtu7IKJ/p5soJ/gGpj7vbvFrAY/eIioQ6Dw23KjZhYgiIo8HOs1nQ2vr/oQ==", + "dev": true + }, + "util": { + "version": "0.10.4", + "resolved": "https://registry.npmjs.org/util/-/util-0.10.4.tgz", + "integrity": "sha512-0Pm9hTQ3se5ll1XihRic3FDIku70C+iHUdT/W926rSgHV5QgXsYbKZN8MSC3tJtSkhuROzvsQjAaFENRXr+19A==", + "dev": true, + "requires": { + "inherits": "2.0.3" + }, + "dependencies": { + "inherits": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.3.tgz", + "integrity": "sha1-Yzwsg+PaQqUC9SRmAiSA9CCCYd4=", + "dev": true + } + } + }, + "util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", + "dev": true + }, + "v8-compile-cache": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/v8-compile-cache/-/v8-compile-cache-2.1.1.tgz", + "integrity": "sha512-8OQ9CL+VWyt3JStj7HX7/ciTL2V3Rl1Wf5OL+SNTm0yK1KvtReVulksyeRnCANHHuUxHlQig+JJDlUhBt1NQDQ==", + "dev": true + }, + "v8flags": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/v8flags/-/v8flags-3.2.0.tgz", + "integrity": "sha512-mH8etigqMfiGWdeXpaaqGfs6BndypxusHHcv2qSHyZkGEznCd/qAXCWWRzeowtL54147cktFOC4P5y+kl8d8Jg==", + "dev": true, + "requires": { + "homedir-polyfill": "^1.0.1" + } + }, + "validate-npm-package-license": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz", + "integrity": "sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==", + "dev": true, + "requires": { + "spdx-correct": "^3.0.0", + "spdx-expression-parse": "^3.0.0" + } + }, + "value-or-function": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/value-or-function/-/value-or-function-3.0.0.tgz", + "integrity": "sha1-HCQ6ULWVwb5Up1S/7OhWO5/42BM=", + "dev": true + }, + "vinyl": { + "version": "2.2.1", + "resolved": "https://registry.npmjs.org/vinyl/-/vinyl-2.2.1.tgz", + "integrity": "sha512-LII3bXRFBZLlezoG5FfZVcXflZgWP/4dCwKtxd5ky9+LOtM4CS3bIRQsmR1KMnMW07jpE8fqR2lcxPZ+8sJIcw==", + "dev": true, + "requires": { + "clone": "^2.1.1", + "clone-buffer": "^1.0.0", + "clone-stats": "^1.0.0", + "cloneable-readable": "^1.0.0", + "remove-trailing-separator": "^1.0.1", + "replace-ext": "^1.0.0" + } + }, + "vinyl-fs": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/vinyl-fs/-/vinyl-fs-3.0.3.tgz", + "integrity": "sha512-vIu34EkyNyJxmP0jscNzWBSygh7VWhqun6RmqVfXePrOwi9lhvRs//dOaGOTRUQr4tx7/zd26Tk5WeSVZitgng==", + "dev": true, + "requires": { + "fs-mkdirp-stream": "^1.0.0", + "glob-stream": "^6.1.0", + "graceful-fs": "^4.0.0", + "is-valid-glob": "^1.0.0", + "lazystream": "^1.0.0", + "lead": "^1.0.0", + "object.assign": "^4.0.4", + "pumpify": "^1.3.5", + "readable-stream": "^2.3.3", + "remove-bom-buffer": "^3.0.0", + "remove-bom-stream": "^1.2.0", + "resolve-options": "^1.1.0", + "through2": "^2.0.0", + "to-through": "^2.0.0", + "value-or-function": "^3.0.0", + "vinyl": "^2.0.0", + "vinyl-sourcemap": "^1.1.0" + }, + "dependencies": { + "through2": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/through2/-/through2-2.0.5.tgz", + "integrity": "sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==", + "dev": true, + "requires": { + "readable-stream": "~2.3.6", + "xtend": "~4.0.1" + } + } + } + }, + "vinyl-sourcemap": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/vinyl-sourcemap/-/vinyl-sourcemap-1.1.0.tgz", + "integrity": "sha1-kqgAWTo4cDqM2xHYswCtS+Y7PhY=", + "dev": true, + "requires": { + "append-buffer": "^1.0.2", + "convert-source-map": "^1.5.0", + "graceful-fs": "^4.1.6", + "normalize-path": "^2.1.1", + "now-and-later": "^2.0.0", + "remove-bom-buffer": "^3.0.0", + "vinyl": "^2.0.0" + }, + "dependencies": { + "normalize-path": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-2.1.1.tgz", + "integrity": "sha1-GrKLVW4Zg2Oowab35vogE3/mrtk=", + "dev": true, + "requires": { + "remove-trailing-separator": "^1.0.1" + } + } + } + }, + "vinyl-sourcemaps-apply": { + "version": "0.2.1", + "resolved": "https://registry.npmjs.org/vinyl-sourcemaps-apply/-/vinyl-sourcemaps-apply-0.2.1.tgz", + "integrity": "sha1-q2VJ1h0XLCsbh75cUI0jnI74dwU=", + "dev": true, + "requires": { + "source-map": "^0.5.1" + } + }, + "vm-browserify": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/vm-browserify/-/vm-browserify-1.1.2.tgz", + "integrity": "sha512-2ham8XPWTONajOR0ohOKOHXkm3+gaBmGut3SRuu75xLd/RRaY6vqgh8NBYYk7+RW3u5AtzPQZG8F10LHkl0lAQ==", + "dev": true + }, + "which": { + "version": "1.3.1", + "resolved": "https://registry.npmjs.org/which/-/which-1.3.1.tgz", + "integrity": "sha512-HxJdYWq1MTIQbJ3nw0cqssHoTNU267KlrDuGZ1WYlxDStUtKUhOaJmh112/TZmHxxUfuJqPXSOm7tDyas0OSIQ==", + "dev": true, + "requires": { + "isexe": "^2.0.0" + } + }, + "which-module": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-1.0.0.tgz", + "integrity": "sha1-u6Y8qGGUiZT/MHc2CJ47lgJsKk8=", + "dev": true + }, + "wide-align": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.3.tgz", + "integrity": "sha512-QGkOQc8XL6Bt5PwnsExKBPuMKBxnGxWWW3fU55Xt4feHozMUhdUMaBCk290qpm/wG5u/RSKzwdAC4i51YigihA==", + "dev": true, + "requires": { + "string-width": "^1.0.2 || 2" + }, + "dependencies": { + "ansi-regex": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-3.0.0.tgz", + "integrity": "sha1-7QMXwyIGT3lGbAKWa922Bas32Zg=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "string-width": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-2.1.1.tgz", + "integrity": "sha512-nOqH59deCq9SRHlxq1Aw85Jnt4w6KvLKqWVik6oA9ZklXLNIOlqg4F2yrT1MVaTjAqvVwdfeZ7w7aCvJD7ugkw==", + "dev": true, + "requires": { + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^4.0.0" + } + }, + "strip-ansi": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-4.0.0.tgz", + "integrity": "sha1-qEeQIusaw2iocTibY1JixQXuNo8=", + "dev": true, + "requires": { + "ansi-regex": "^3.0.0" + } + } + } + }, + "word-wrap": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/word-wrap/-/word-wrap-1.2.3.tgz", + "integrity": "sha512-Hz/mrNwitNRh/HUAtM/VT/5VH+ygD6DV7mYKZAtHOrbs8U7lvPS6xf7EJKMF0uW1KJCl0H701g3ZGus+muE5vQ==", + "dev": true + }, + "wordwrap": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", + "integrity": "sha1-J1hIEIkUVqQXHI0CJkQa3pDLyus=", + "dev": true + }, + "workerpool": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/workerpool/-/workerpool-6.0.0.tgz", + "integrity": "sha512-fU2OcNA/GVAJLLyKUoHkAgIhKb0JoCpSjLC/G2vYKxUjVmQwGbRVeoPJ1a8U4pnVofz4AQV5Y/NEw8oKqxEBtA==", + "dev": true + }, + "wrap-ansi": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-2.1.0.tgz", + "integrity": "sha1-2Pw9KE3QV5T+hJc8rs3Rz4JP3YU=", + "dev": true, + "requires": { + "string-width": "^1.0.1", + "strip-ansi": "^3.0.1" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + } + } + }, + "wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", + "dev": true + }, + "write": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/write/-/write-1.0.3.tgz", + "integrity": "sha512-/lg70HAjtkUgWPVZhZcm+T4hkL8Zbtp1nFNOn3lRrxnlv50SRBv7cR7RqR+GMsd3hUXy9hWBo4CHTbFTcOYwig==", + "dev": true, + "requires": { + "mkdirp": "^0.5.1" + }, + "dependencies": { + "mkdirp": { + "version": "0.5.5", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-0.5.5.tgz", + "integrity": "sha512-NKmAlESf6jMGym1++R0Ra7wvhV+wFW63FaSOFPwRahvea0gMUcGUhVeAg/0BC0wiv9ih5NYPB1Wn1UEI1/L+xQ==", + "dev": true, + "requires": { + "minimist": "^1.2.5" + } + } + } + }, + "xml2js": { + "version": "0.4.23", + "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", + "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", + "dev": true, + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~11.0.0" + } + }, + "xmlbuilder": { + "version": "11.0.1", + "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", + "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", + "dev": true + }, + "xtend": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/xtend/-/xtend-4.0.2.tgz", + "integrity": "sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==", + "dev": true + }, + "y18n": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-3.2.1.tgz", + "integrity": "sha1-bRX7qITAhnnA136I53WegR4H+kE=", + "dev": true + }, + "yargs": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-7.1.1.tgz", + "integrity": "sha512-huO4Fr1f9PmiJJdll5kwoS2e4GqzGSsMT3PPMpOwoVkOK8ckqAewMTZyA6LXVQWflleb/Z8oPBEvNsMft0XE+g==", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "cliui": "^3.2.0", + "decamelize": "^1.1.1", + "get-caller-file": "^1.0.1", + "os-locale": "^1.4.0", + "read-pkg-up": "^1.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^1.0.1", + "set-blocking": "^2.0.0", + "string-width": "^1.0.2", + "which-module": "^1.0.0", + "y18n": "^3.2.1", + "yargs-parser": "5.0.0-security.0" + }, + "dependencies": { + "ansi-regex": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-2.1.1.tgz", + "integrity": "sha1-w7M6te42DYbg5ijwRorn7yfWVN8=", + "dev": true + }, + "find-up": { + "version": "1.1.2", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-1.1.2.tgz", + "integrity": "sha1-ay6YIrGizgpgq2TWEOzK1TyyTQ8=", + "dev": true, + "requires": { + "path-exists": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "is-fullwidth-code-point": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-1.0.0.tgz", + "integrity": "sha1-754xOG8DGn8NZDr4L95QxFfvAMs=", + "dev": true, + "requires": { + "number-is-nan": "^1.0.0" + } + }, + "load-json-file": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/load-json-file/-/load-json-file-1.1.0.tgz", + "integrity": "sha1-lWkFcI1YtLq0wiYbBPWfMcmTdMA=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "parse-json": "^2.2.0", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0", + "strip-bom": "^2.0.0" + } + }, + "path-exists": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/path-exists/-/path-exists-2.1.0.tgz", + "integrity": "sha1-D+tsZPD8UY2adU3V77YscCJ2H0s=", + "dev": true, + "requires": { + "pinkie-promise": "^2.0.0" + } + }, + "path-type": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/path-type/-/path-type-1.1.0.tgz", + "integrity": "sha1-WcRPfuSR2nBNpBXaWkBwuk+P5EE=", + "dev": true, + "requires": { + "graceful-fs": "^4.1.2", + "pify": "^2.0.0", + "pinkie-promise": "^2.0.0" + } + }, + "read-pkg": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/read-pkg/-/read-pkg-1.1.0.tgz", + "integrity": "sha1-9f+qXs0pyzHAR0vKfXVra7KePyg=", + "dev": true, + "requires": { + "load-json-file": "^1.0.0", + "normalize-package-data": "^2.3.2", + "path-type": "^1.0.0" + } + }, + "read-pkg-up": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-1.0.1.tgz", + "integrity": "sha1-nWPBMnbAZZGNV/ACpX9AobZD+wI=", + "dev": true, + "requires": { + "find-up": "^1.0.0", + "read-pkg": "^1.0.0" + } + }, + "string-width": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-1.0.2.tgz", + "integrity": "sha1-EYvfW4zcUaKn5w0hHgfisLmxB9M=", + "dev": true, + "requires": { + "code-point-at": "^1.0.0", + "is-fullwidth-code-point": "^1.0.0", + "strip-ansi": "^3.0.0" + } + }, + "strip-ansi": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-3.0.1.tgz", + "integrity": "sha1-ajhfuIU9lS1f8F0Oiq+UJ43GPc8=", + "dev": true, + "requires": { + "ansi-regex": "^2.0.0" + } + }, + "strip-bom": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strip-bom/-/strip-bom-2.0.0.tgz", + "integrity": "sha1-YhmoVhZSBJHzV4i9vxRHqZx+aw4=", + "dev": true, + "requires": { + "is-utf8": "^0.2.0" + } + } + } + }, + "yargs-parser": { + "version": "5.0.0-security.0", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-5.0.0-security.0.tgz", + "integrity": "sha512-T69y4Ps64LNesYxeYGYPvfoMTt/7y1XtfpIslUeK4um+9Hu7hlGoRtaDLvdXb7+/tfq4opVa2HRY5xGip022rQ==", + "dev": true, + "requires": { + "camelcase": "^3.0.0", + "object.assign": "^4.1.0" + } + }, + "yargs-unparser": { + "version": "1.6.1", + "resolved": "https://registry.npmjs.org/yargs-unparser/-/yargs-unparser-1.6.1.tgz", + "integrity": "sha512-qZV14lK9MWsGCmcr7u5oXGH0dbGqZAIxTDrWXZDo5zUr6b6iUmelNKO6x6R1dQT24AH3LgRxJpr8meWy2unolA==", + "dev": true, + "requires": { + "camelcase": "^5.3.1", + "decamelize": "^1.2.0", + "flat": "^4.1.0", + "is-plain-obj": "^1.1.0", + "yargs": "^14.2.3" + }, + "dependencies": { + "ansi-styles": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", + "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", + "dev": true, + "requires": { + "color-convert": "^1.9.0" + } + }, + "camelcase": { + "version": "5.3.1", + "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-5.3.1.tgz", + "integrity": "sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==", + "dev": true + }, + "cliui": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-5.0.0.tgz", + "integrity": "sha512-PYeGSEmmHM6zvoef2w8TPzlrnNpXIjTipYK780YswmIP9vjxmd6Y2a3CB2Ks6/AU8NHjZugXvo8w3oWM2qnwXA==", + "dev": true, + "requires": { + "string-width": "^3.1.0", + "strip-ansi": "^5.2.0", + "wrap-ansi": "^5.1.0" + } + }, + "color-convert": { + "version": "1.9.3", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", + "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", + "dev": true, + "requires": { + "color-name": "1.1.3" + } + }, + "color-name": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", + "integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU=", + "dev": true + }, + "emoji-regex": { + "version": "7.0.3", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-7.0.3.tgz", + "integrity": "sha512-CwBLREIQ7LvYFB0WyRvwhq5N5qPhc6PMjD6bYggFlI5YyDgl+0vxq5VHbMOFqLg7hfWzmu8T5Z1QofhmTIhItA==", + "dev": true + }, + "find-up": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/find-up/-/find-up-3.0.0.tgz", + "integrity": "sha512-1yD6RmLI1XBfxugvORwlck6f75tYL+iR0jqwsOrOxMZyGYqUuDhJ0l4AXdO1iX/FTs9cBAMEk1gWSEx1kSbylg==", + "dev": true, + "requires": { + "locate-path": "^3.0.0" + } + }, + "get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true + }, + "is-fullwidth-code-point": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-2.0.0.tgz", + "integrity": "sha1-o7MKXE8ZkYMWeqq5O+764937ZU8=", + "dev": true + }, + "locate-path": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/locate-path/-/locate-path-3.0.0.tgz", + "integrity": "sha512-7AO748wWnIhNqAuaty2ZWHkQHRSNfPVIsPIfwEOWO22AmaoVrWavlOcMR5nzTLNYvp36X220/maaRsrec1G65A==", + "dev": true, + "requires": { + "p-locate": "^3.0.0", + "path-exists": "^3.0.0" + } + }, + "p-limit": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz", + "integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==", + "dev": true, + "requires": { + "p-try": "^2.0.0" + } + }, + "p-locate": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/p-locate/-/p-locate-3.0.0.tgz", + "integrity": "sha512-x+12w/To+4GFfgJhBEpiDcLozRJGegY+Ei7/z0tSLkMmxGZNybVMSfWj9aJn8Z5Fc7dBUNJOOVgPv2H7IwulSQ==", + "dev": true, + "requires": { + "p-limit": "^2.0.0" + } + }, + "p-try": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/p-try/-/p-try-2.2.0.tgz", + "integrity": "sha512-R4nPAVTAU0B9D35/Gk3uJf/7XYbQcyohSKdvAxIRSNghFl4e71hVoGnBNQz9cWaXxO2I10KTC+3jMdvvoKw6dQ==", + "dev": true + }, + "require-main-filename": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/require-main-filename/-/require-main-filename-2.0.0.tgz", + "integrity": "sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==", + "dev": true + }, + "string-width": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-3.1.0.tgz", + "integrity": "sha512-vafcv6KjVZKSgz06oM/H6GDBrAtz8vdhQakGjFIvNrHA6y3HCF1CInLy+QLq8dTJPQ1b+KDUqDFctkdRW44e1w==", + "dev": true, + "requires": { + "emoji-regex": "^7.0.1", + "is-fullwidth-code-point": "^2.0.0", + "strip-ansi": "^5.1.0" + } + }, + "which-module": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/which-module/-/which-module-2.0.0.tgz", + "integrity": "sha1-2e8H3Od7mQK4o6j6SzHD4/fm6Ho=", + "dev": true + }, + "wrap-ansi": { + "version": "5.1.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-5.1.0.tgz", + "integrity": "sha512-QC1/iN/2/RPVJ5jYK8BGttj5z83LmSKmvbvrXPNCLZSEb32KKVDJDl/MOt2N01qU2H/FkzEa9PKto1BqDjtd7Q==", + "dev": true, + "requires": { + "ansi-styles": "^3.2.0", + "string-width": "^3.0.0", + "strip-ansi": "^5.0.0" + } + }, + "y18n": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-4.0.0.tgz", + "integrity": "sha512-r9S/ZyXu/Xu9q1tYlpsLIsa3EeLXXk0VwlxqTcFRfg9EhMW+17kbt9G0NrgCmhGb5vT2hyhJZLfDGx+7+5Uj/w==", + "dev": true + }, + "yargs": { + "version": "14.2.3", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-14.2.3.tgz", + "integrity": "sha512-ZbotRWhF+lkjijC/VhmOT9wSgyBQ7+zr13+YLkhfsSiTriYsMzkTUFP18pFhWwBeMa5gUc1MzbhrO6/VB7c9Xg==", + "dev": true, + "requires": { + "cliui": "^5.0.0", + "decamelize": "^1.2.0", + "find-up": "^3.0.0", + "get-caller-file": "^2.0.1", + "require-directory": "^2.1.1", + "require-main-filename": "^2.0.0", + "set-blocking": "^2.0.0", + "string-width": "^3.0.0", + "which-module": "^2.0.0", + "y18n": "^4.0.0", + "yargs-parser": "^15.0.1" + } + }, + "yargs-parser": { + "version": "15.0.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-15.0.1.tgz", + "integrity": "sha512-0OAMV2mAZQrs3FkNpDQcBk1x5HXb8X4twADss4S0Iuk+2dGnLOE/fRHrsYm542GduMveyA77OF4wrNJuanRCWw==", + "dev": true, + "requires": { + "camelcase": "^5.0.0", + "decamelize": "^1.2.0" + } + } + } + } + } +} diff --git a/package.json b/package.json index 7f9e66add40..1b80935f622 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "typescript", "author": "Microsoft Corp.", "homepage": "https://www.typescriptlang.org/", - "version": "4.0.0", + "version": "4.1.0", "license": "Apache-2.0", "description": "TypeScript is a language for application scale JavaScript development", "keywords": [ @@ -88,7 +88,6 @@ "mocha-fivemat-progress-reporter": "latest", "ms": "latest", "node-fetch": "^2.6.0", - "playwright": "0.12.1", "plugin-error": "latest", "pretty-hrtime": "^1.0.3", "prex": "^0.4.3", diff --git a/scripts/browserIntegrationTest.js b/scripts/browserIntegrationTest.js index 218cef8c0fb..622af7cb43d 100644 --- a/scripts/browserIntegrationTest.js +++ b/scripts/browserIntegrationTest.js @@ -1,14 +1,24 @@ -const playwright = require("playwright"); +// @ts-check const chalk = require("chalk"); const { join } = require("path"); const { readFileSync } = require("fs"); +try { + // eslint-disable-next-line import/no-extraneous-dependencies + require("playwright"); +} +catch (error) { + throw new Error("Playwright is expected to be installed manually before running this script"); +} + +// eslint-disable-next-line import/no-extraneous-dependencies +const playwright = require("playwright"); // Turning this on will leave the Chromium browser open, giving you the // chance to open up the web inspector. const debugging = false; (async () => { - for (const browserType of ["chromium", "firefox", "webkit"]) { + for (const browserType of ["chromium", "firefox"]) { const browser = await playwright[browserType].launch({ headless: !debugging }); const context = await browser.newContext(); const page = await context.newPage(); @@ -21,7 +31,6 @@ const debugging = false; page.on("error", errorCaught); page.on("pageerror", errorCaught); - page.on("console", log => console[log._type](log._text)); await page.setContent(` @@ -35,5 +44,14 @@ const debugging = false; else { console.log("Not closing the browser, you'll need to exit the process in your terminal manually"); } + console.log(`${browserType} :+1:`); } })(); + +process.on("unhandledRejection", (/** @type {any}*/ err) => { + if (err) { + console.error(err.stack || err.message); + } + process.exit(1); +}); + diff --git a/scripts/open-user-pr.ts b/scripts/open-user-pr.ts index 04cace3e698..bdab591d6b3 100644 --- a/scripts/open-user-pr.ts +++ b/scripts/open-user-pr.ts @@ -2,14 +2,14 @@ /// // Must reference esnext.asynciterable lib, since octokit uses AsyncIterable internally import { Octokit } from "@octokit/rest"; -import {runSequence} from "./run-sequence"; +const {runSequence} = require("./run-sequence"); -const userName = process.env.GH_USERNAME; +const userName = process.env.GH_USERNAME || "typescript-bot"; const reviewers = process.env.REQUESTING_USER ? [process.env.REQUESTING_USER] : ["weswigham", "sandersn", "RyanCavanaugh"]; const now = new Date(); const masterBranchname = `user-baseline-updates`; const targetBranch = process.env.TARGET_BRANCH || "master"; -const branchName = process.env.TARGET_FORK.toLowerCase() === "microsoft" && (targetBranch === "master" || targetBranch === "refs/heads/master") +const branchName = process.env.TARGET_FORK?.toLowerCase() === "microsoft" && (targetBranch === "master" || targetBranch === "refs/heads/master") ? masterBranchname : `user-update-${process.env.TARGET_FORK}-${process.env.TARGET_BRANCH ? "-" + process.env.TARGET_BRANCH : ""}`; const remoteUrl = `https://${process.argv[2]}@github.com/${userName}/TypeScript.git`; @@ -22,7 +22,7 @@ runSequence([ ["node", ["./node_modules/gulp/bin/gulp.js", "baseline-accept"]], // accept baselines ["git", ["checkout", "-b", branchName]], // create a branch ["git", ["add", "."]], // Add all changes - ["git", ["commit", "-m", `"Update user baselines"`]], // Commit all changes + ["git", ["commit", "-m", `"Update user baselines${+process.env.SOURCE_ISSUE === 33716 ? " +cc @sandersn" : ""}"`]], // Commit all changes (ping nathan if we would post to CI thread) ["git", ["push", "--set-upstream", "fork", branchName, "-f"]] // push the branch ]); @@ -46,7 +46,7 @@ cc ${reviewers.map(r => "@" + r).join(" ")}`, const num = r.data.number; console.log(`Pull request ${num} created.`); if (!process.env.SOURCE_ISSUE) { - await gh.pulls.createReviewRequest({ + await gh.pulls.requestReviewers({ owner: prOwner, repo: "TypeScript", pull_number: num, diff --git a/scripts/produceLKG.ts b/scripts/produceLKG.ts index 7439abe9fce..af99441208b 100644 --- a/scripts/produceLKG.ts +++ b/scripts/produceLKG.ts @@ -15,9 +15,9 @@ async function produceLKG() { await copyLibFiles(); await copyLocalizedDiagnostics(); await copyTypesMap(); - await buildProtocol(); await copyScriptOutputs(); await copyDeclarationOutputs(); + await buildProtocol(); await writeGitAttributes(); } diff --git a/scripts/run-sequence.js b/scripts/run-sequence.js index f014cde1b91..21c771ad991 100644 --- a/scripts/run-sequence.js +++ b/scripts/run-sequence.js @@ -10,7 +10,7 @@ function runSequence(tasks, opts = { timeout: 100000, shell: true }) { for (const task of tasks) { console.log(`${task[0]} ${task[1].join(" ")}`); const result = cp.spawnSync(task[0], task[1], opts); - if (result.status !== 0) throw new Error(`${task[0]} ${task[1].join(" ")} failed: ${result.stderr && result.stderr.toString()}`); + if (result.status !== 0) throw new Error(`${task[0]} ${task[1].join(" ")} failed: ${result.stderr && "stderr: " + result.stderr.toString()}${result.stdout && "\nstdout: " + result.stdout.toString()}`); console.log(result.stdout && result.stdout.toString()); lastResult = result; } diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index f61aa3ab900..aec962016a2 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -174,12 +174,14 @@ namespace ts { const binder = createBinder(); export function bindSourceFile(file: SourceFile, options: CompilerOptions) { + tracing.begin(tracing.Phase.Bind, "bindSourceFile", { path: file.path }); performance.mark("beforeBind"); perfLogger.logStartBindFile("" + file.fileName); binder(file, options); perfLogger.logStopBindFile(); performance.mark("afterBind"); performance.measure("Bind", "beforeBind", "afterBind"); + tracing.end(); } function createBinder(): (file: SourceFile, options: CompilerOptions) => void { @@ -541,7 +543,7 @@ namespace ts { } function declareModuleMember(node: Declaration, symbolFlags: SymbolFlags, symbolExcludes: SymbolFlags): Symbol { - const hasExportModifier = getCombinedModifierFlags(node) & ModifierFlags.Export; + const hasExportModifier = !!(getCombinedModifierFlags(node) & ModifierFlags.Export) || jsdocTreatAsExported(node); if (symbolFlags & SymbolFlags.Alias) { if (node.kind === SyntaxKind.ExportSpecifier || (node.kind === SyntaxKind.ImportEqualsDeclaration && hasExportModifier)) { return declareSymbol(container.symbol.exports!, container.symbol, node, symbolFlags, symbolExcludes); @@ -567,7 +569,7 @@ namespace ts { // and this case is specially handled. Module augmentations should only be merged with original module definition // and should never be merged directly with other augmentation, and the latter case would be possible if automatic merge is allowed. if (isJSDocTypeAlias(node)) Debug.assert(isInJSFile(node)); // We shouldn't add symbols for JSDoc nodes if not in a JS file. - if ((!isAmbientModule(node) && (hasExportModifier || container.flags & NodeFlags.ExportContext)) || isJSDocTypeAlias(node)) { + if (!isAmbientModule(node) && (hasExportModifier || container.flags & NodeFlags.ExportContext)) { if (!container.locals || (hasSyntacticModifier(node, ModifierFlags.Default) && !getDeclarationName(node))) { return declareSymbol(container.symbol.exports!, container.symbol, node, symbolFlags, symbolExcludes); // No local symbol for an unnamed default! } @@ -583,6 +585,21 @@ namespace ts { } } + function jsdocTreatAsExported(node: Node) { + if (!isJSDocTypeAlias(node)) return false; + // jsdoc typedef handling is a bit of a doozy, but to summarize, treat the typedef as exported if: + // 1. It has an explicit name (since by default typedefs are always directly exported, either at the top level or in a container), or + if (!isJSDocEnumTag(node) && !!node.fullName) return true; + // 2. The thing a nameless typedef pulls its name from is implicitly a direct export (either by assignment or actual export flag). + const declName = getNameOfDeclaration(node); + if (!declName) return false; + if (isPropertyAccessEntityNameExpression(declName.parent) && isTopLevelNamespaceAssignment(declName.parent)) return true; + if (isDeclaration(declName.parent) && getCombinedModifierFlags(declName.parent) & ModifierFlags.Export) return true; + // This could potentially be simplified by having `delayedBindJSDocTypedefTag` pass in an override for `hasExportModifier`, since it should + // already have calculated and branched on most of this. + return false; + } + // All container nodes are kept on a linked list in declaration order. This list is used by // the getLocalNameOfContainer function in the type checker to validate that the local name // used for a container is unique. @@ -816,6 +833,7 @@ namespace ts { function isNarrowingExpression(expr: Expression): boolean { switch (expr.kind) { case SyntaxKind.Identifier: + case SyntaxKind.PrivateIdentifier: case SyntaxKind.ThisKeyword: case SyntaxKind.PropertyAccessExpression: case SyntaxKind.ElementAccessExpression: @@ -835,9 +853,10 @@ namespace ts { } function isNarrowableReference(expr: Expression): boolean { - return expr.kind === SyntaxKind.Identifier || expr.kind === SyntaxKind.ThisKeyword || expr.kind === SyntaxKind.SuperKeyword || + return expr.kind === SyntaxKind.Identifier || expr.kind === SyntaxKind.PrivateIdentifier || expr.kind === SyntaxKind.ThisKeyword || expr.kind === SyntaxKind.SuperKeyword || (isPropertyAccessExpression(expr) || isNonNullExpression(expr) || isParenthesizedExpression(expr)) && isNarrowableReference(expr.expression) || - isElementAccessExpression(expr) && isStringOrNumericLiteralLike(expr.argumentExpression) && isNarrowableReference(expr.expression); + isElementAccessExpression(expr) && isStringOrNumericLiteralLike(expr.argumentExpression) && isNarrowableReference(expr.expression) || + isAssignmentExpression(expr) && isNarrowableReference(expr.left); } function containsNarrowableReference(expr: Expression): boolean { @@ -2461,7 +2480,7 @@ namespace ts { if (isInJSFile(expr) && file.commonJsModuleIndicator && isModuleExportsAccessExpression(expr) && - !lookupSymbolForNameWorker(blockScopeContainer, "module" as __String)) { + !lookupSymbolForName(blockScopeContainer, "module" as __String)) { declareSymbol(file.locals!, /*parent*/ undefined, expr.expression, SymbolFlags.FunctionScopedVariable | SymbolFlags.ModuleExports, SymbolFlags.FunctionScopedVariableExcludes); } @@ -2485,6 +2504,14 @@ namespace ts { bindThisPropertyAssignment(node as BindablePropertyAssignmentExpression); break; case AssignmentDeclarationKind.Property: + const expression = ((node as BinaryExpression).left as AccessExpression).expression; + if (isInJSFile(node) && isIdentifier(expression)) { + const symbol = lookupSymbolForName(blockScopeContainer, expression.escapedText); + if (isThisInitializedDeclaration(symbol?.valueDeclaration)) { + bindThisPropertyAssignment(node as BindablePropertyAssignmentExpression); + break; + } + } bindSpecialPropertyAssignment(node as BindablePropertyAssignmentExpression); break; case AssignmentDeclarationKind.None: @@ -2781,9 +2808,9 @@ namespace ts { return symbol; }); if (symbol) { - const flags = isClassExpression(node.right) ? - SymbolFlags.Property | SymbolFlags.ExportValue | SymbolFlags.Class : - SymbolFlags.Property | SymbolFlags.ExportValue; + const isAlias = isAliasableExpression(node.right) && (isExportsIdentifier(node.left.expression) || isModuleExportsAccessExpression(node.left.expression)); + const flags = isAlias ? SymbolFlags.Alias : SymbolFlags.Property | SymbolFlags.ExportValue; + setParent(node.left, node); declareSymbol(symbol.exports!, symbol, node.left, flags, SymbolFlags.None); } } @@ -2950,6 +2977,10 @@ namespace ts { if (!isInJSFile(node) && !isFunctionSymbol(parentSymbol)) { return; } + const rootExpr = getLeftmostAccessExpression(node.left); + if (isIdentifier(rootExpr) && lookupSymbolForName(container, rootExpr.escapedText)!?.flags & SymbolFlags.Alias) { + return; + } // Fix up parent pointers since we're going to use these nodes before we bind into them setParent(node.left, node); setParent(node.right, node); @@ -3103,7 +3134,7 @@ namespace ts { function lookupSymbolForPropertyAccess(node: BindableStaticNameExpression, lookupContainer: Node = container): Symbol | undefined { if (isIdentifier(node)) { - return lookupSymbolForNameWorker(lookupContainer, node.escapedText); + return lookupSymbolForName(lookupContainer, node.escapedText); } else { const symbol = lookupSymbolForPropertyAccess(node.expression); @@ -3185,7 +3216,10 @@ namespace ts { } if (!isBindingPattern(node.name)) { - if (isBlockOrCatchScoped(node)) { + if (isInJSFile(node) && isRequireVariableDeclaration(node, /*requireStringLiteralLikeArgument*/ true) && !getJSDocTypeTag(node)) { + declareSymbolAndAddToSymbolTable(node as Declaration, SymbolFlags.Alias, SymbolFlags.AliasExcludes); + } + else if (isBlockOrCatchScoped(node)) { bindBlockScopedDeclaration(node, SymbolFlags.BlockScopedVariable, SymbolFlags.BlockScopedVariableExcludes); } else if (isParameterDeclaration(node)) { @@ -3403,7 +3437,7 @@ namespace ts { return true; } else if (isIdentifier(node)) { - const symbol = lookupSymbolForNameWorker(sourceFile, node.escapedText); + const symbol = lookupSymbolForName(sourceFile, node.escapedText); if (!!symbol && !!symbol.valueDeclaration && isVariableDeclaration(symbol.valueDeclaration) && !!symbol.valueDeclaration.initializer) { const init = symbol.valueDeclaration.initializer; q.push(init); @@ -3417,7 +3451,7 @@ namespace ts { return false; } - function lookupSymbolForNameWorker(container: Node, name: __String): Symbol | undefined { + function lookupSymbolForName(container: Node, name: __String): Symbol | undefined { const local = container.locals && container.locals.get(name); if (local) { return local.exportSymbol || local; diff --git a/src/compiler/builder.ts b/src/compiler/builder.ts index 7765a753312..4c2f6258ddf 100644 --- a/src/compiler/builder.ts +++ b/src/compiler/builder.ts @@ -493,10 +493,10 @@ namespace ts { return !state.semanticDiagnosticsFromOldState.size; } - function isChangedSignagure(state: BuilderProgramState, path: Path) { + function isChangedSignature(state: BuilderProgramState, path: Path) { const newSignature = Debug.checkDefined(state.currentAffectedFilesSignatures).get(path); - const oldSignagure = Debug.checkDefined(state.fileInfos.get(path)).signature; - return newSignature !== oldSignagure; + const oldSignature = Debug.checkDefined(state.fileInfos.get(path)).signature; + return newSignature !== oldSignature; } /** @@ -509,7 +509,7 @@ namespace ts { return; } - if (!isChangedSignagure(state, affectedFile.resolvedPath)) return; + if (!isChangedSignature(state, affectedFile.resolvedPath)) return; // Since isolated modules dont change js files, files affected by change in signature is itself // But we need to cleanup semantic diagnostics and queue dts emit for affected files @@ -522,7 +522,7 @@ namespace ts { if (!seenFileNamesMap.has(currentPath)) { seenFileNamesMap.set(currentPath, true); const result = fn(state, currentPath); - if (result && isChangedSignagure(state, currentPath)) { + if (result && isChangedSignature(state, currentPath)) { const currentSourceFile = Debug.checkDefined(state.program).getSourceFileByPath(currentPath)!; queue.push(...BuilderState.getReferencedByPaths(state, currentSourceFile.resolvedPath)); } diff --git a/src/compiler/builderState.ts b/src/compiler/builderState.ts index 1ad8c0aad17..69b3f2558e5 100644 --- a/src/compiler/builderState.ts +++ b/src/compiler/builderState.ts @@ -206,6 +206,9 @@ namespace ts { const hasCalledUpdateShapeSignature = new Set(); const useOldState = canReuseOldState(referencedMap, oldState); + // Ensure source files have parent pointers set + newProgram.getTypeChecker(); + // Create the reference map, and set the file infos for (const sourceFile of newProgram.getSourceFiles()) { const version = Debug.checkDefined(sourceFile.version, "Program intended to be used with Builder should have source files with versions set"); @@ -547,7 +550,6 @@ namespace ts { } } - // Return array of values that needs emit // Return array of values that needs emit return arrayFrom(mapDefinedIterator(seenFileNamesMap.values(), value => value)); } diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 10911b9784b..283886a495d 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -16,6 +16,7 @@ namespace ts { YieldStarFlag = 1 << 4, SpreadFlag = 1 << 5, DestructuringFlag = 1 << 6, + PossiblyOutOfBounds = 1 << 7, // Spread, Destructuring, Array element assignment Element = AllowsSyncIterablesFlag, @@ -131,6 +132,7 @@ namespace ts { UndefinedFacts = TypeofNEString | TypeofNENumber | TypeofNEBigInt | TypeofNEBoolean | TypeofNESymbol | TypeofNEObject | TypeofNEFunction | TypeofNEHostObject | EQUndefined | EQUndefinedOrNull | NENull | Falsy, NullFacts = TypeofEQObject | TypeofNEString | TypeofNENumber | TypeofNEBigInt | TypeofNEBoolean | TypeofNESymbol | TypeofNEFunction | TypeofNEHostObject | EQNull | EQUndefinedOrNull | NEUndefined | Falsy, EmptyObjectStrictFacts = All & ~(EQUndefined | EQNull | EQUndefinedOrNull), + AllTypeofNE = TypeofNEString | TypeofNENumber | TypeofNEBigInt | TypeofNEBoolean | TypeofNESymbol | TypeofNEObject | TypeofNEFunction | NEUndefined, EmptyObjectFacts = All, } @@ -166,6 +168,7 @@ namespace ts { ImmediateBaseConstraint, EnumTagType, ResolvedTypeArguments, + ResolvedBaseTypes, } const enum CheckMode { @@ -183,6 +186,7 @@ namespace ts { Writing = 1 << 1, CacheSymbol = 1 << 2, NoTupleBoundsCheck = 1 << 3, + ExpressionPosition = 1 << 4, } const enum SignatureCheckMode { @@ -246,6 +250,26 @@ namespace ts { ExportNamespace = 1 << 2, } + const enum MinArgumentCountFlags { + None = 0, + StrongArityForUntypedJS = 1 << 0, + VoidIsNonOptional = 1 << 1, + } + + const enum IntrinsicTypeKind { + Uppercase, + Lowercase, + Capitalize, + Uncapitalize + } + + const intrinsicTypeKinds: ReadonlyESMap = new Map(getEntries({ + Uppercase: IntrinsicTypeKind.Uppercase, + Lowercase: IntrinsicTypeKind.Lowercase, + Capitalize: IntrinsicTypeKind.Capitalize, + Uncapitalize: IntrinsicTypeKind.Uncapitalize + })); + function SymbolLinks(this: SymbolLinks) { } @@ -315,6 +339,8 @@ namespace ts { let constraintDepth = 0; let currentNode: Node | undefined; + const typeCatalog: Type[] = []; // NB: id is index + 1 + const emptySymbols = createSymbolTable(); const arrayVariances = [VarianceFlags.Covariant]; @@ -358,6 +384,7 @@ namespace ts { getNodeCount: () => sum(host.getSourceFiles(), "nodeCount"), getIdentifierCount: () => sum(host.getSourceFiles(), "identifierCount"), getSymbolCount: () => sum(host.getSourceFiles(), "symbolCount") + symbolCount, + getTypeCatalog: () => typeCatalog, getTypeCount: () => typeCount, getInstantiationCount: () => totalInstantiationCount, getRelationCacheSizes: () => ({ @@ -372,6 +399,7 @@ namespace ts { getMergedSymbol, getDiagnostics, getGlobalDiagnostics, + getRecursionIdentity, getTypeOfSymbolAtLocation: (symbol, locationIn) => { const location = getParseTreeNode(locationIn); return location ? getTypeOfSymbolAtLocation(symbol, location) : errorType; @@ -479,6 +507,7 @@ namespace ts { }, getAugmentedPropertiesOfType, getRootSymbols, + getSymbolOfExpando, getContextualType: (nodeIn: Expression, contextFlags?: ContextFlags) => { const node = getParseTreeNode(nodeIn, isExpression); if (!node) { @@ -690,6 +719,8 @@ namespace ts { const intersectionTypes = new Map(); const literalTypes = new Map(); const indexedAccessTypes = new Map(); + const templateLiteralTypes = new Map(); + const stringMappingTypes = new Map(); const substitutionTypes = new Map(); const evolvingArrayTypes: EvolvingArrayType[] = []; const undefinedProperties: SymbolTable = new Map(); @@ -702,6 +733,7 @@ namespace ts { const wildcardType = createIntrinsicType(TypeFlags.Any, "any"); const errorType = createIntrinsicType(TypeFlags.Any, "error"); const nonInferrableAnyType = createIntrinsicType(TypeFlags.Any, "any", ObjectFlags.ContainsWideningType); + const intrinsicMarkerType = createIntrinsicType(TypeFlags.Any, "intrinsic"); const unknownType = createIntrinsicType(TypeFlags.Unknown, "unknown"); const undefinedType = createIntrinsicType(TypeFlags.Undefined, "undefined"); const undefinedWideningType = strictNullChecks ? undefinedType : createIntrinsicType(TypeFlags.Undefined, "undefined", ObjectFlags.ContainsWideningType); @@ -740,6 +772,7 @@ namespace ts { const stringNumberSymbolType = getUnionType([stringType, numberType, esSymbolType]); const keyofConstraintType = keyofStringsOnly ? stringType : stringNumberSymbolType; const numberOrBigIntType = getUnionType([numberType, bigintType]); + const templateConstraintType = getUnionType([stringType, numberType, booleanType, bigintType, nullType, undefinedType]) as UnionType; const permissiveMapper: TypeMapper = makeFunctionTypeMapper(t => t.flags & TypeFlags.TypeParameter ? wildcardType : t); @@ -968,6 +1001,11 @@ namespace ts { return file.localJsxFragmentNamespace = getFirstIdentifier(file.localJsxFragmentFactory).escapedText; } } + const entity = getJsxFragmentFactoryEntity(location); + if (entity) { + file.localJsxFragmentFactory = entity; + return file.localJsxFragmentNamespace = getFirstIdentifier(entity).escapedText; + } } else { if (file.localJsxNamespace) { @@ -1912,11 +1950,17 @@ namespace ts { if (lastLocation && ( lastLocation === (location as BindingElement).initializer || lastLocation === (location as BindingElement).name && isBindingPattern(lastLocation))) { - const root = getRootDeclaration(location); - if (root.kind === SyntaxKind.Parameter) { - if (!associatedDeclarationForContainingInitializerOrBindingName) { - associatedDeclarationForContainingInitializerOrBindingName = location as BindingElement; - } + if (isParameterDeclaration(location as BindingElement) && !associatedDeclarationForContainingInitializerOrBindingName) { + associatedDeclarationForContainingInitializerOrBindingName = location as BindingElement; + } + } + break; + case SyntaxKind.InferType: + if (meaning & SymbolFlags.TypeParameter) { + const parameterName = (location).typeParameter.name; + if (parameterName && name === parameterName.escapedText) { + result = (location).typeParameter.symbol; + break loop; } } break; @@ -2239,16 +2283,32 @@ namespace ts { } const symbol = resolveSymbol(resolveName(errorLocation, name, SymbolFlags.Type & ~SymbolFlags.Value, /*nameNotFoundMessage*/undefined, /*nameArg*/ undefined, /*isUse*/ false)); if (symbol && !(symbol.flags & SymbolFlags.NamespaceModule)) { - const message = isES2015OrLaterConstructorName(name) - ? Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later - : Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here; - error(errorLocation, message, unescapeLeadingUnderscores(name)); + const rawName = unescapeLeadingUnderscores(name); + if (isES2015OrLaterConstructorName(name)) { + error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later, rawName); + } + else if (maybeMappedType(errorLocation, symbol)) { + error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0, rawName, rawName === "K" ? "P" : "K"); + } + else { + error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, rawName); + } return true; } } return false; } + function maybeMappedType(node: Node, symbol: Symbol) { + const container = findAncestor(node.parent, n => + isComputedPropertyName(n) || isPropertySignature(n) ? false : isTypeLiteralNode(n) || "quit") as TypeLiteralNode | undefined; + if (container && container.members.length === 1) { + const type = getDeclaredTypeOfSymbol(symbol); + return !!(type.flags & TypeFlags.Union) && allTypesAssignableToKind(type, TypeFlags.StringOrNumberLiteral, /*strict*/ true); + } + return false; + } + function isES2015OrLaterConstructorName(n: __String) { switch (n) { case "Promise": @@ -2365,32 +2425,42 @@ namespace ts { * {name: } */ function isAliasSymbolDeclaration(node: Node): boolean { - return node.kind === SyntaxKind.ImportEqualsDeclaration || - node.kind === SyntaxKind.NamespaceExportDeclaration || - node.kind === SyntaxKind.ImportClause && !!(node).name || - node.kind === SyntaxKind.NamespaceImport || - node.kind === SyntaxKind.NamespaceExport || - node.kind === SyntaxKind.ImportSpecifier || - node.kind === SyntaxKind.ExportSpecifier || - node.kind === SyntaxKind.ExportAssignment && exportAssignmentIsAlias(node) || - isBinaryExpression(node) && getAssignmentDeclarationKind(node) === AssignmentDeclarationKind.ModuleExports && exportAssignmentIsAlias(node) || - isPropertyAccessExpression(node) + return node.kind === SyntaxKind.ImportEqualsDeclaration + || node.kind === SyntaxKind.NamespaceExportDeclaration + || node.kind === SyntaxKind.ImportClause && !!(node).name + || node.kind === SyntaxKind.NamespaceImport + || node.kind === SyntaxKind.NamespaceExport + || node.kind === SyntaxKind.ImportSpecifier + || node.kind === SyntaxKind.ExportSpecifier + || node.kind === SyntaxKind.ExportAssignment && exportAssignmentIsAlias(node) + || isBinaryExpression(node) && getAssignmentDeclarationKind(node) === AssignmentDeclarationKind.ModuleExports && exportAssignmentIsAlias(node) + || isAccessExpression(node) && isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === SyntaxKind.EqualsToken - && isAliasableOrJsExpression(node.parent.right) || - node.kind === SyntaxKind.ShorthandPropertyAssignment || - node.kind === SyntaxKind.PropertyAssignment && isAliasableOrJsExpression((node as PropertyAssignment).initializer); + && isAliasableOrJsExpression(node.parent.right) + || node.kind === SyntaxKind.ShorthandPropertyAssignment + || node.kind === SyntaxKind.PropertyAssignment && isAliasableOrJsExpression((node as PropertyAssignment).initializer) + || isRequireVariableDeclaration(node, /*requireStringLiteralLikeArgument*/ true); } function isAliasableOrJsExpression(e: Expression) { return isAliasableExpression(e) || isFunctionExpression(e) && isJSConstructor(e); } - function getTargetOfImportEqualsDeclaration(node: ImportEqualsDeclaration, dontResolveAlias: boolean): Symbol | undefined { - if (node.moduleReference.kind === SyntaxKind.ExternalModuleReference) { - const immediate = resolveExternalModuleName(node, getExternalModuleImportEqualsDeclarationExpression(node)); - const resolved = resolveExternalModuleSymbol(immediate); + function getTargetOfImportEqualsDeclaration(node: ImportEqualsDeclaration | VariableDeclaration, dontResolveAlias: boolean): Symbol | undefined { + const commonJSPropertyAccess = getCommonJSPropertyAccess(node); + if (commonJSPropertyAccess) { + const name = (getLeftmostAccessExpression(commonJSPropertyAccess.expression) as CallExpression).arguments[0] as StringLiteral; + return isIdentifier(commonJSPropertyAccess.name) + ? resolveSymbol(getPropertyOfType(resolveExternalModuleTypeByLiteral(name), commonJSPropertyAccess.name.escapedText)) + : undefined; + } + if (isVariableDeclaration(node) || node.moduleReference.kind === SyntaxKind.ExternalModuleReference) { + const immediate = resolveExternalModuleName( + node, + getExternalModuleRequireArgument(node) || getExternalModuleImportEqualsDeclarationExpression(node)); + const resolved = resolveExternalModuleSymbol(immediate); markSymbolOfAliasDeclarationIfTypeOnly(node, immediate, resolved, /*overwriteEmpty*/ false); return resolved; } @@ -2578,10 +2648,9 @@ namespace ts { return result; } - function getExportOfModule(symbol: Symbol, specifier: ImportOrExportSpecifier, dontResolveAlias: boolean): Symbol | undefined { + function getExportOfModule(symbol: Symbol, name: Identifier, specifier: Declaration, dontResolveAlias: boolean): Symbol | undefined { if (symbol.flags & SymbolFlags.Module) { - const name = (specifier.propertyName ?? specifier.name).escapedText; - const exportSymbol = getExportsOfSymbol(symbol).get(name); + const exportSymbol = getExportsOfSymbol(symbol).get(name.escapedText); const resolved = resolveSymbol(exportSymbol, dontResolveAlias); markSymbolOfAliasDeclarationIfTypeOnly(specifier, exportSymbol, resolved, /*overwriteEmpty*/ false); return resolved; @@ -2597,11 +2666,15 @@ namespace ts { } } - function getExternalModuleMember(node: ImportDeclaration | ExportDeclaration, specifier: ImportOrExportSpecifier, dontResolveAlias = false): Symbol | undefined { - const moduleSymbol = resolveExternalModuleName(node, node.moduleSpecifier!)!; // TODO: GH#18217 - const name = specifier.propertyName || specifier.name; + function getExternalModuleMember(node: ImportDeclaration | ExportDeclaration | VariableDeclaration, specifier: ImportOrExportSpecifier | BindingElement | PropertyAccessExpression, dontResolveAlias = false): Symbol | undefined { + const moduleSpecifier = getExternalModuleRequireArgument(node) || (node as ImportDeclaration | ExportDeclaration).moduleSpecifier!; + const moduleSymbol = resolveExternalModuleName(node, moduleSpecifier)!; // TODO: GH#18217 + const name = !isPropertyAccessExpression(specifier) && specifier.propertyName || specifier.name; + if (!isIdentifier(name)) { + return undefined; + } const suppressInteropError = name.escapedText === InternalSymbolName.Default && !!(compilerOptions.allowSyntheticDefaultImports || compilerOptions.esModuleInterop); - const targetSymbol = resolveESModuleSymbol(moduleSymbol, node.moduleSpecifier!, dontResolveAlias, suppressInteropError); + const targetSymbol = resolveESModuleSymbol(moduleSymbol, moduleSpecifier, dontResolveAlias, suppressInteropError); if (targetSymbol) { if (name.escapedText) { if (isShorthandAmbientModuleSymbol(moduleSymbol)) { @@ -2616,10 +2689,10 @@ namespace ts { else { symbolFromVariable = getPropertyOfVariable(targetSymbol, name.escapedText); } - // if symbolFromVariable is export - get its final target symbolFromVariable = resolveSymbol(symbolFromVariable, dontResolveAlias); - let symbolFromModule = getExportOfModule(targetSymbol, specifier, dontResolveAlias); + + let symbolFromModule = getExportOfModule(targetSymbol, name, specifier, dontResolveAlias); if (symbolFromModule === undefined && name.escapedText === InternalSymbolName.Default) { const file = find(moduleSymbol.declarations, isSourceFile); if (canHaveSyntheticDefault(file, moduleSymbol, dontResolveAlias)) { @@ -2636,7 +2709,7 @@ namespace ts { const suggestion = getSuggestedSymbolForNonexistentModule(name, targetSymbol); if (suggestion !== undefined) { const suggestionName = symbolToString(suggestion); - const diagnostic = error(name, Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_2, moduleName, declarationName, suggestionName); + const diagnostic = error(name, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, moduleName, declarationName, suggestionName); if (suggestion.valueDeclaration) { addRelatedInfo(diagnostic, createDiagnosticForNode(suggestion.valueDeclaration, Diagnostics._0_is_declared_here, suggestionName) @@ -2662,7 +2735,7 @@ namespace ts { } } - function reportNonExportedMember(node: ImportDeclaration | ExportDeclaration, name: Identifier, declarationName: string, moduleSymbol: Symbol, moduleName: string): void { + function reportNonExportedMember(node: ImportDeclaration | ExportDeclaration | VariableDeclaration, name: Identifier, declarationName: string, moduleSymbol: Symbol, moduleName: string): void { const localSymbol = moduleSymbol.valueDeclaration.locals?.get(name.escapedText); const exports = moduleSymbol.exports; if (localSymbol) { @@ -2686,7 +2759,7 @@ namespace ts { } } - function reportInvalidImportEqualsExportMember(node: ImportDeclaration | ExportDeclaration, name: Identifier, declarationName: string, moduleName: string) { + function reportInvalidImportEqualsExportMember(node: ImportDeclaration | ExportDeclaration | VariableDeclaration, name: Identifier, declarationName: string, moduleName: string) { if (moduleKind >= ModuleKind.ES2015) { const message = compilerOptions.esModuleInterop ? Diagnostics._0_can_only_be_imported_by_using_a_default_import : Diagnostics._0_can_only_be_imported_by_turning_on_the_esModuleInterop_flag_and_using_a_default_import; @@ -2706,12 +2779,24 @@ namespace ts { } } - function getTargetOfImportSpecifier(node: ImportSpecifier, dontResolveAlias: boolean): Symbol | undefined { - const resolved = getExternalModuleMember(node.parent.parent.parent, node, dontResolveAlias); + function getTargetOfImportSpecifier(node: ImportSpecifier | BindingElement, dontResolveAlias: boolean): Symbol | undefined { + const root = isBindingElement(node) ? getRootDeclaration(node) as VariableDeclaration : node.parent.parent.parent; + const commonJSPropertyAccess = getCommonJSPropertyAccess(root); + const resolved = getExternalModuleMember(root, commonJSPropertyAccess || node, dontResolveAlias); + const name = node.propertyName || node.name; + if (commonJSPropertyAccess && resolved && isIdentifier(name)) { + return getPropertyOfType(getTypeOfSymbol(resolved), name.escapedText); + } markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); return resolved; } + function getCommonJSPropertyAccess(node: Node) { + if (isVariableDeclaration(node) && node.initializer && isPropertyAccessExpression(node.initializer)) { + return node.initializer; + } + } + function getTargetOfNamespaceExportDeclaration(node: NamespaceExportDeclaration, dontResolveAlias: boolean): Symbol { const resolved = resolveExternalModuleSymbol(node.parent.symbol, dontResolveAlias); markSymbolOfAliasDeclarationIfTypeOnly(node, /*immediateTarget*/ undefined, resolved, /*overwriteEmpty*/ false); @@ -2753,7 +2838,7 @@ namespace ts { return getTargetOfAliasLikeExpression(expression, dontRecursivelyResolve); } - function getTargetOfPropertyAccessExpression(node: PropertyAccessExpression, dontRecursivelyResolve: boolean): Symbol | undefined { + function getTargetOfAccessExpression(node: AccessExpression, dontRecursivelyResolve: boolean): Symbol | undefined { if (!(isBinaryExpression(node.parent) && node.parent.left === node && node.parent.operatorToken.kind === SyntaxKind.EqualsToken)) { return undefined; } @@ -2764,15 +2849,17 @@ namespace ts { function getTargetOfAliasDeclaration(node: Declaration, dontRecursivelyResolve = false): Symbol | undefined { switch (node.kind) { case SyntaxKind.ImportEqualsDeclaration: - return getTargetOfImportEqualsDeclaration(node, dontRecursivelyResolve); + case SyntaxKind.VariableDeclaration: + return getTargetOfImportEqualsDeclaration(node as ImportEqualsDeclaration | VariableDeclaration, dontRecursivelyResolve); case SyntaxKind.ImportClause: - return getTargetOfImportClause(node, dontRecursivelyResolve); + return getTargetOfImportClause(node as ImportClause, dontRecursivelyResolve); case SyntaxKind.NamespaceImport: return getTargetOfNamespaceImport(node, dontRecursivelyResolve); case SyntaxKind.NamespaceExport: return getTargetOfNamespaceExport(node, dontRecursivelyResolve); case SyntaxKind.ImportSpecifier: - return getTargetOfImportSpecifier(node, dontRecursivelyResolve); + case SyntaxKind.BindingElement: + return getTargetOfImportSpecifier(node as ImportSpecifier | BindingElement, dontRecursivelyResolve); case SyntaxKind.ExportSpecifier: return getTargetOfExportSpecifier(node, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace, dontRecursivelyResolve); case SyntaxKind.ExportAssignment: @@ -2784,8 +2871,9 @@ namespace ts { return resolveEntityName((node as ShorthandPropertyAssignment).name, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace, /*ignoreErrors*/ true, dontRecursivelyResolve); case SyntaxKind.PropertyAssignment: return getTargetOfPropertyAssignment(node as PropertyAssignment, dontRecursivelyResolve); + case SyntaxKind.ElementAccessExpression: case SyntaxKind.PropertyAccessExpression: - return getTargetOfPropertyAccessExpression(node as PropertyAccessExpression, dontRecursivelyResolve); + return getTargetOfAccessExpression(node as AccessExpression, dontRecursivelyResolve); default: return Debug.fail(); } @@ -2862,7 +2950,7 @@ namespace ts { finalTarget: Symbol | undefined, overwriteEmpty: boolean, ): boolean { - if (!aliasDeclaration) return false; + if (!aliasDeclaration || isPropertyAccessExpression(aliasDeclaration)) return false; // If the declaration itself is type-only, mark it and return. // No need to check what it resolves to. @@ -3013,7 +3101,12 @@ namespace ts { symbol = getMergedSymbol(getSymbol(getExportsOfSymbol(namespace), right.escapedText, meaning)); if (!symbol) { if (!ignoreErrors) { - error(right, Diagnostics.Namespace_0_has_no_exported_member_1, getFullyQualifiedName(namespace), declarationNameToString(right)); + const namespaceName = getFullyQualifiedName(namespace); + const declarationName = declarationNameToString(right); + const suggestion = getSuggestedSymbolForNonexistentModule(right, namespace); + suggestion ? + error(right, Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2, namespaceName, declarationName, symbolToString(suggestion)) : + error(right, Diagnostics.Namespace_0_has_no_exported_member_1, namespaceName, declarationName); } return undefined; } @@ -3105,9 +3198,12 @@ namespace ts { } } - function resolveExternalModuleName(location: Node, moduleReferenceExpression: Expression, ignoreErrors?: boolean): Symbol | undefined { - return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? undefined : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations); + const isClassic = getEmitModuleResolutionKind(compilerOptions) === ModuleResolutionKind.Classic; + const errorMessage = isClassic? + Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option + : Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations; + return resolveExternalModuleNameWorker(location, moduleReferenceExpression, ignoreErrors ? undefined : errorMessage); } function resolveExternalModuleNameWorker(location: Node, moduleReferenceExpression: Expression, moduleNotFoundError: DiagnosticMessage | undefined, isForAugmentation = false): Symbol | undefined { @@ -3216,7 +3312,7 @@ namespace ts { packageId.name, mangleScopedPackageName(packageId.name)) : chainDiagnosticMessages( /*details*/ undefined, - Diagnostics.Try_npm_install_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0, + Diagnostics.Try_npm_i_save_dev_types_Slash_1_if_it_exists_or_add_a_new_declaration_d_ts_file_containing_declare_module_0, moduleReference, mangleScopedPackageName(packageId.name)) : undefined; @@ -3620,6 +3716,7 @@ namespace ts { const result = new Type(checker, flags); typeCount++; result.id = typeCount; + typeCatalog.push(result); return result; } @@ -4132,7 +4229,8 @@ namespace ts { function symbolToStringWorker(writer: EmitTextWriter) { const entity = builder(symbol, meaning!, enclosingDeclaration, nodeFlags)!; // TODO: GH#18217 - const printer = createPrinter({ removeComments: true }); + // add neverAsciiEscape for GH#39027 + const printer = enclosingDeclaration?.kind === SyntaxKind.SourceFile ? createPrinter({ removeComments: true, neverAsciiEscape: true }) : createPrinter({ removeComments: true }); const sourceFile = enclosingDeclaration && getSourceFileOfNode(enclosingDeclaration); printer.writeNode(EmitHint.Unspecified, entity, /*sourceFile*/ sourceFile, writer); return writer; @@ -4197,6 +4295,10 @@ namespace ts { return flags & TypeFormatFlags.NodeBuilderFlagsMask; } + function isClassInstanceSide(type: Type) { + return !!type.symbol && !!(type.symbol.flags & SymbolFlags.Class) && (type === getDeclaredTypeOfClassOrInterface(type.symbol) || !!(getObjectFlags(type) & ObjectFlags.IsClassInstanceClone)); + } + function createNodeBuilder() { return { typeToTypeNode: (type: Type, enclosingDeclaration?: Node, flags?: NodeBuilderFlags, tracker?: SymbolTracker) => @@ -4229,12 +4331,13 @@ namespace ts { getCommonSourceDirectory: !!(host as Program).getCommonSourceDirectory ? () => (host as Program).getCommonSourceDirectory() : () => "", getSourceFiles: () => host.getSourceFiles(), getCurrentDirectory: () => host.getCurrentDirectory(), - getProbableSymlinks: maybeBind(host, host.getProbableSymlinks), + getSymlinkCache: maybeBind(host, host.getSymlinkCache), useCaseSensitiveFileNames: maybeBind(host, host.useCaseSensitiveFileNames), redirectTargetsMap: host.redirectTargetsMap, getProjectReferenceRedirect: fileName => host.getProjectReferenceRedirect(fileName), isSourceOfProjectReferenceRedirect: fileName => host.isSourceOfProjectReferenceRedirect(fileName), fileExists: fileName => host.fileExists(fileName), + getCompilerOptions: () => host.getCompilerOptions() } : undefined }, encounteredError: false, visitedTypes: undefined, @@ -4243,6 +4346,9 @@ namespace ts { approximateLength: 0 }; const resultingNode = cb(context); + if (context.truncating && context.flags & NodeBuilderFlags.NoTruncation) { + context.tracker?.reportTruncationError?.(); + } return context.encounteredError ? undefined : resultingNode; } @@ -4273,7 +4379,7 @@ namespace ts { if (type.flags & TypeFlags.Any) { context.approximateLength += 3; - return factory.createKeywordTypeNode(SyntaxKind.AnyKeyword); + return factory.createKeywordTypeNode(type === intrinsicMarkerType ? SyntaxKind.IntrinsicKeyword : SyntaxKind.AnyKeyword); } if (type.flags & TypeFlags.Unknown) { return factory.createKeywordTypeNode(SyntaxKind.UnknownKeyword); @@ -4432,6 +4538,21 @@ namespace ts { const indexTypeNode = typeToTypeNodeHelper(indexedType, context); return factory.createTypeOperatorNode(SyntaxKind.KeyOfKeyword, indexTypeNode); } + if (type.flags & TypeFlags.TemplateLiteral) { + const texts = (type).texts; + const types = (type).types; + const templateHead = factory.createTemplateHead(texts[0]); + const templateSpans = factory.createNodeArray( + map(types, (t, i) => factory.createTemplateLiteralTypeSpan( + typeToTypeNodeHelper(t, context), + (i < types.length - 1 ? factory.createTemplateMiddle : factory.createTemplateTail)(texts[i + 1])))); + context.approximateLength += 2; + return factory.createTemplateLiteralType(templateHead, templateSpans); + } + if (type.flags & TypeFlags.StringMapping) { + const typeNode = typeToTypeNodeHelper((type).type, context); + return symbolToTypeNode((type).symbol, context, SymbolFlags.Type, [typeNode]); + } if (type.flags & TypeFlags.IndexedAccess) { const objectTypeNode = typeToTypeNodeHelper((type).objectType, context); const indexTypeNode = typeToTypeNodeHelper((type).indexType, context); @@ -4484,8 +4605,9 @@ namespace ts { appropriateConstraintTypeNode = typeToTypeNodeHelper(getConstraintTypeFromMappedType(type), context); } const typeParameterNode = typeParameterToDeclarationWithConstraint(getTypeParameterFromMappedType(type), context, appropriateConstraintTypeNode); + const nameTypeNode = type.declaration.nameType ? typeToTypeNodeHelper(getNameTypeFromMappedType(type)!, context) : undefined; const templateTypeNode = typeToTypeNodeHelper(getTemplateTypeFromMappedType(type), context); - const mappedTypeNode = factory.createMappedTypeNode(readonlyToken, typeParameterNode, questionToken, templateTypeNode); + const mappedTypeNode = factory.createMappedTypeNode(readonlyToken, typeParameterNode, nameTypeNode, questionToken, templateTypeNode); context.approximateLength += 10; return setEmitFlags(mappedTypeNode, EmitFlags.SingleLine); } @@ -4494,16 +4616,16 @@ namespace ts { const typeId = type.id; const symbol = type.symbol; if (symbol) { + const isInstanceType = isClassInstanceSide(type) ? SymbolFlags.Type : SymbolFlags.Value; if (isJSConstructor(symbol.valueDeclaration)) { // Instance and static types share the same symbol; only add 'typeof' for the static side. - const isInstanceType = type === getDeclaredTypeOfClassOrInterface(symbol) ? SymbolFlags.Type : SymbolFlags.Value; return symbolToTypeNode(symbol, context, isInstanceType); } // Always use 'typeof T' for type of class, enum, and module objects else if (symbol.flags & SymbolFlags.Class && !getBaseTypeVariableOfClass(symbol) && !(symbol.valueDeclaration.kind === SyntaxKind.ClassExpression && context.flags & NodeBuilderFlags.WriteClassExpressionAsTypeLiteral) || symbol.flags & (SymbolFlags.Enum | SymbolFlags.ValueModule) || shouldWriteTypeOfFunctionSymbol()) { - return symbolToTypeNode(symbol, context, SymbolFlags.Value); + return symbolToTypeNode(symbol, context, isInstanceType); } else if (context.visitedTypes?.has(typeId)) { // If type is an anonymous type literal in a type alias declaration, use type alias name @@ -4572,8 +4694,8 @@ namespace ts { } function createTypeNodeFromObjectType(type: ObjectType): TypeNode { - if (isGenericMappedType(type)) { - return createMappedTypeNodeFromType(type); + if (isGenericMappedType(type) || (type as MappedType).containsError) { + return createMappedTypeNodeFromType(type as MappedType); } const resolved = resolveStructuredTypeMembers(type); @@ -5016,7 +5138,9 @@ namespace ts { typeParameters = signature.typeParameters && signature.typeParameters.map(parameter => typeParameterToDeclaration(parameter, context)); } - const parameters = getExpandedParameters(signature, /*skipUnionExpanding*/ true)[0].map(parameter => symbolToParameterDeclaration(parameter, context, kind === SyntaxKind.Constructor, options?.privateSymbolVisitor, options?.bundledImports)); + const expandedParams = getExpandedParameters(signature, /*skipUnionExpanding*/ true)[0]; + // If the expanded parameter list had a variadic in a non-trailing position, don't expand it + const parameters = (some(expandedParams, p => p !== expandedParams[expandedParams.length - 1] && !!(getCheckFlags(p) & CheckFlags.RestParameter)) ? signature.parameters : expandedParams).map(parameter => symbolToParameterDeclaration(parameter, context, kind === SyntaxKind.Constructor, options?.privateSymbolVisitor, options?.bundledImports)); if (signature.thisParameter) { const thisParameter = symbolToParameterDeclaration(signature.thisParameter, context); parameters.unshift(thisParameter); @@ -5570,15 +5694,14 @@ namespace ts { } } + function isStringNamed(d: Declaration) { + const name = getNameOfDeclaration(d); + return !!name && isStringLiteral(name); + } + function isSingleQuotedStringNamed(d: Declaration) { const name = getNameOfDeclaration(d); - if (name && isStringLiteral(name) && ( - name.singleQuote || - (!nodeIsSynthesized(name) && startsWith(getTextOfNode(name, /*includeTrivia*/ false), "'")) - )) { - return true; - } - return false; + return !!(name && isStringLiteral(name) && (name.singleQuote || !nodeIsSynthesized(name) && startsWith(getTextOfNode(name, /*includeTrivia*/ false), "'"))); } function getPropertyNameNodeForSymbol(symbol: Symbol, context: NodeBuilderContext) { @@ -5591,7 +5714,8 @@ namespace ts { return factory.createComputedPropertyName(factory.createPropertyAccessExpression(factory.createIdentifier("Symbol"), (symbol.escapedName as string).substr(3))); } const rawName = unescapeLeadingUnderscores(symbol.escapedName); - return createPropertyNameNodeForIdentifierOrLiteral(rawName, singleQuote); + const stringNamed = !!length(symbol.declarations) && every(symbol.declarations, isStringNamed); + return createPropertyNameNodeForIdentifierOrLiteral(rawName, stringNamed, singleQuote); } // See getNameForSymbolFromNameType for a stringy equivalent @@ -5614,9 +5738,9 @@ namespace ts { } } - function createPropertyNameNodeForIdentifierOrLiteral(name: string, singleQuote?: boolean) { + function createPropertyNameNodeForIdentifierOrLiteral(name: string, stringNamed?: boolean, singleQuote?: boolean) { return isIdentifierText(name, compilerOptions.target) ? factory.createIdentifier(name) : - isNumericLiteralName(name) && +name >= 0 ? factory.createNumericLiteral(+name) : + !stringNamed && isNumericLiteralName(name) && +name >= 0 ? factory.createNumericLiteral(+name) : factory.createStringLiteral(name, !!singleQuote); } @@ -5769,7 +5893,7 @@ namespace ts { /*decorators*/ undefined, /*modifiers*/ undefined, getEffectiveDotDotDotForParameter(p), - p.name || getEffectiveDotDotDotForParameter(p) ? `args` : `arg${i}`, + getNameForJSDocFunctionParameter(p, i), p.questionToken, visitNode(p.type, visitExistingNodeTreeSymbols), /*initializer*/ undefined @@ -5784,7 +5908,7 @@ namespace ts { /*decorators*/ undefined, /*modifiers*/ undefined, getEffectiveDotDotDotForParameter(p), - p.name || getEffectiveDotDotDotForParameter(p) ? `args` : `arg${i}`, + getNameForJSDocFunctionParameter(p, i), p.questionToken, visitNode(p.type, visitExistingNodeTreeSymbols), /*initializer*/ undefined @@ -5839,6 +5963,13 @@ namespace ts { return p.dotDotDotToken || (p.type && isJSDocVariadicType(p.type) ? factory.createToken(SyntaxKind.DotDotDotToken) : undefined); } + /** Note that `new:T` parameters are not handled, but should be before calling this function. */ + function getNameForJSDocFunctionParameter(p: ParameterDeclaration, index: number) { + return p.name && isIdentifier(p.name) && p.name.escapedText === "this" ? "this" + : getEffectiveDotDotDotForParameter(p) ? `args` + : `arg${index}`; + } + function rewriteModuleSpecifier(parent: ImportTypeNode, lit: StringLiteral) { if (bundled) { if (context.tracker && context.tracker.moduleResolverHost) { @@ -5848,7 +5979,8 @@ namespace ts { const resolverHost = { getCanonicalFileName, getCurrentDirectory: () => context.tracker.moduleResolverHost!.getCurrentDirectory(), - getCommonSourceDirectory: () => context.tracker.moduleResolverHost!.getCommonSourceDirectory() + getCommonSourceDirectory: () => context.tracker.moduleResolverHost!.getCommonSourceDirectory(), + getCompilerOptions: () => context.tracker.moduleResolverHost!.getCompilerOptions() }; const newName = getResolvedExternalModuleName(resolverHost, targetFile); return factory.createStringLiteral(newName); @@ -5881,7 +6013,7 @@ namespace ts { const enclosingDeclaration = context.enclosingDeclaration!; let results: Statement[] = []; const visitedSymbols = new Set(); - let deferredPrivates: ESMap | undefined; + const deferredPrivatesStack: ESMap[] = []; const oldcontext = context; context = { ...oldcontext, @@ -6092,9 +6224,8 @@ namespace ts { } function visitSymbolTable(symbolTable: SymbolTable, suppressNewPrivateContext?: boolean, propertyAsAlias?: boolean) { - const oldDeferredPrivates = deferredPrivates; if (!suppressNewPrivateContext) { - deferredPrivates = new Map(); + deferredPrivatesStack.push(new Map()); } symbolTable.forEach((symbol: Symbol) => { serializeSymbol(symbol, /*isPrivate*/ false, !!propertyAsAlias); @@ -6103,11 +6234,11 @@ namespace ts { // deferredPrivates will be filled up by visiting the symbol table // And will continue to iterate as elements are added while visited `deferredPrivates` // (As that's how a map iterator is defined to work) - deferredPrivates!.forEach((symbol: Symbol) => { + deferredPrivatesStack[deferredPrivatesStack.length - 1].forEach((symbol: Symbol) => { serializeSymbol(symbol, /*isPrivate*/ true, !!propertyAsAlias); }); + deferredPrivatesStack.pop(); } - deferredPrivates = oldDeferredPrivates; } function serializeSymbol(symbol: Symbol, isPrivate: boolean, propertyAsAlias: boolean) { @@ -6200,43 +6331,60 @@ namespace ts { if (textRange && isVariableDeclarationList(textRange.parent) && textRange.parent.declarations.length === 1) { textRange = textRange.parent.parent; } - const statement = setTextRange(factory.createVariableStatement(/*modifiers*/ undefined, factory.createVariableDeclarationList([ - factory.createVariableDeclaration(name, /*exclamationToken*/ undefined, serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, includePrivateSymbol, bundled)) - ], flags)), textRange); - addResult(statement, name !== localName ? modifierFlags & ~ModifierFlags.Export : modifierFlags); - if (name !== localName && !isPrivate) { - // We rename the variable declaration we generate for Property symbols since they may have a name which - // conflicts with a local declaration. For example, given input: - // ``` - // function g() {} - // module.exports.g = g - // ``` - // In such a situation, we have a local variable named `g`, and a separate exported variable named `g`. - // Naively, we would emit - // ``` - // function g() {} - // export const g: typeof g; - // ``` - // That's obviously incorrect - the `g` in the type annotation needs to refer to the local `g`, but - // the export declaration shadows it. - // To work around that, we instead write - // ``` - // function g() {} - // const g_1: typeof g; - // export { g_1 as g }; - // ``` - // To create an export named `g` that does _not_ shadow the local `g` + const propertyAccessRequire = find(symbol.declarations, isPropertyAccessExpression); + if (propertyAccessRequire && isBinaryExpression(propertyAccessRequire.parent) && isIdentifier(propertyAccessRequire.parent.right) + && type.symbol && isSourceFile(type.symbol.valueDeclaration)) { + const alias = localName === propertyAccessRequire.parent.right.escapedText ? undefined : propertyAccessRequire.parent.right; addResult( factory.createExportDeclaration( /*decorators*/ undefined, /*modifiers*/ undefined, /*isTypeOnly*/ false, - factory.createNamedExports([factory.createExportSpecifier(name, localName)]) + factory.createNamedExports([factory.createExportSpecifier(alias, localName)]) ), ModifierFlags.None ); - needsExportDeclaration = false; - needsPostExportDefault = false; + context.tracker.trackSymbol!(type.symbol, context.enclosingDeclaration, SymbolFlags.Value); + } + else { + const statement = setTextRange(factory.createVariableStatement(/*modifiers*/ undefined, factory.createVariableDeclarationList([ + factory.createVariableDeclaration(name, /*exclamationToken*/ undefined, serializeTypeForDeclaration(context, type, symbol, enclosingDeclaration, includePrivateSymbol, bundled)) + ], flags)), textRange); + addResult(statement, name !== localName ? modifierFlags & ~ModifierFlags.Export : modifierFlags); + if (name !== localName && !isPrivate) { + // We rename the variable declaration we generate for Property symbols since they may have a name which + // conflicts with a local declaration. For example, given input: + // ``` + // function g() {} + // module.exports.g = g + // ``` + // In such a situation, we have a local variable named `g`, and a separate exported variable named `g`. + // Naively, we would emit + // ``` + // function g() {} + // export const g: typeof g; + // ``` + // That's obviously incorrect - the `g` in the type annotation needs to refer to the local `g`, but + // the export declaration shadows it. + // To work around that, we instead write + // ``` + // function g() {} + // const g_1: typeof g; + // export { g_1 as g }; + // ``` + // To create an export named `g` that does _not_ shadow the local `g` + addResult( + factory.createExportDeclaration( + /*decorators*/ undefined, + /*modifiers*/ undefined, + /*isTypeOnly*/ false, + factory.createNamedExports([factory.createExportSpecifier(name, localName)]) + ), + ModifierFlags.None + ); + needsExportDeclaration = false; + needsPostExportDefault = false; + } } } } @@ -6258,7 +6406,8 @@ namespace ts { if ((symbol.flags & (SymbolFlags.ValueModule | SymbolFlags.NamespaceModule) && (!isConstMergedWithNS || isTypeOnlyNamespace(symbol))) || isConstMergedWithNSPrintableAsSignatureMerge) { serializeModule(symbol, symbolName, modifierFlags); } - if (symbol.flags & SymbolFlags.Interface) { + // The class meaning serialization should handle serializing all interface members + if (symbol.flags & SymbolFlags.Interface && !(symbol.flags & SymbolFlags.Class)) { serializeInterface(symbol, symbolName, modifierFlags); } if (symbol.flags & SymbolFlags.Alias) { @@ -6291,9 +6440,19 @@ namespace ts { function includePrivateSymbol(symbol: Symbol) { if (some(symbol.declarations, isParameterDeclaration)) return; - Debug.assertIsDefined(deferredPrivates); + Debug.assertIsDefined(deferredPrivatesStack[deferredPrivatesStack.length - 1]); getUnusedName(unescapeLeadingUnderscores(symbol.escapedName), symbol); // Call to cache unique name for symbol - deferredPrivates.set(getSymbolId(symbol), symbol); + // Blanket moving (import) aliases into the root private context should work, since imports are not valid within namespaces + // (so they must have been in the root to begin with if they were real imports) cjs `require` aliases (an upcoming feature) + // will throw a wrench in this, since those may have been nested, but we'll need to synthesize them in the outer scope + // anyway, as that's the only place the import they translate to is valid. In such a case, we might need to use a unique name + // for the moved import; which hopefully the above `getUnusedName` call should produce. + const isExternalImportAlias = !!(symbol.flags & SymbolFlags.Alias) && !some(symbol.declarations, d => + !!findAncestor(d, isExportDeclaration) || + isNamespaceExport(d) || + (isImportEqualsDeclaration(d) && !isExternalModuleReference(d.moduleReference)) + ); + deferredPrivatesStack[isExternalImportAlias ? 0 : (deferredPrivatesStack.length - 1)].set(getSymbolId(symbol), symbol); } function isExportingScope(enclosingDeclaration: Node) { @@ -6514,7 +6673,7 @@ namespace ts { function isNamespaceMember(p: Symbol) { return !!(p.flags & (SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias)) || - !(p.flags & SymbolFlags.Prototype || p.escapedName === "prototype" || p.valueDeclaration && isClassLike(p.valueDeclaration.parent)); + !(p.flags & SymbolFlags.Prototype || p.escapedName === "prototype" || p.valueDeclaration && getEffectiveModifierFlags(p.valueDeclaration) & ModifierFlags.Static && isClassLike(p.valueDeclaration.parent)); } function serializeAsClass(symbol: Symbol, localName: string, modifierFlags: ModifierFlags) { @@ -6603,17 +6762,45 @@ namespace ts { const targetName = getInternalSymbolName(target, verbatimTargetName); includePrivateSymbol(target); // the target may be within the same scope - attempt to serialize it first switch (node.kind) { + case SyntaxKind.VariableDeclaration: + // commonjs require: const x = require('y') + if (isPropertyAccessExpression((node as VariableDeclaration).initializer!)) { + // const x = require('y').z + const initializer = (node as VariableDeclaration).initializer! as PropertyAccessExpression; // require('y').z + const uniqueName = factory.createUniqueName((getExternalModuleRequireArgument(node) as StringLiteral).text); // _y + const specifier = getSpecifierForModuleSymbol(target.parent || target, context); // 'y' + // import _y = require('y'); + addResult(factory.createImportEqualsDeclaration( + /*decorators*/ undefined, + /*modifiers*/ undefined, + uniqueName, + factory.createExternalModuleReference(factory.createStringLiteral(specifier)) + ), ModifierFlags.None); + // import x = _y.z + addResult(factory.createImportEqualsDeclaration( + /*decorators*/ undefined, + /*modifiers*/ undefined, + factory.createIdentifier(localName), + factory.createQualifiedName(uniqueName, initializer.name as Identifier), + ), modifierFlags); + break; + } + // else fall through and treat commonjs require just like import= case SyntaxKind.ImportEqualsDeclaration: + if (target.escapedName === InternalSymbolName.ExportEquals) { + serializeMaybeAliasAssignment(symbol); + break; + } // Could be a local `import localName = ns.member` or // an external `import localName = require("whatever")` - const isLocalImport = !(target.flags & SymbolFlags.ValueModule); + const isLocalImport = !(target.flags & SymbolFlags.ValueModule) && !isVariableDeclaration(node); addResult(factory.createImportEqualsDeclaration( /*decorators*/ undefined, /*modifiers*/ undefined, factory.createIdentifier(localName), isLocalImport ? symbolToName(target, context, SymbolFlags.All, /*expectsIdentifier*/ false) - : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(symbol, context))) + : factory.createExternalModuleReference(factory.createStringLiteral(getSpecifierForModuleSymbol(target, context))) ), isLocalImport ? modifierFlags : ModifierFlags.None); break; case SyntaxKind.NamespaceExportDeclaration: @@ -6683,6 +6870,7 @@ namespace ts { break; case SyntaxKind.BinaryExpression: case SyntaxKind.PropertyAccessExpression: + case SyntaxKind.ElementAccessExpression: // Could be best encoded as though an export specifier or as though an export assignment // If name is default or export=, do an export assignment // Otherwise do an export specifier @@ -6718,7 +6906,7 @@ namespace ts { const name = unescapeLeadingUnderscores(symbol.escapedName); const isExportEquals = name === InternalSymbolName.ExportEquals; const isDefault = name === InternalSymbolName.Default; - const isExportAssignment = isExportEquals || isDefault; + const isExportAssignmentCompatibleSymbolName = isExportEquals || isDefault; // synthesize export = ref // ref should refer to either be a locally scoped symbol which we need to emit, or // a reference to another namespace/module which we may need to emit an `import` statement for @@ -6730,8 +6918,8 @@ namespace ts { // In case `target` refers to a namespace member, look at the declaration and serialize the leftmost symbol in it // eg, `namespace A { export class B {} }; exports = A.B;` // Technically, this is all that's required in the case where the assignment is an entity name expression - const expr = isExportAssignment ? getExportAssignmentExpression(aliasDecl as ExportAssignment | BinaryExpression) : getPropertyAssignmentAliasLikeExpression(aliasDecl as ShorthandPropertyAssignment | PropertyAssignment | PropertyAccessExpression); - const first = isEntityNameExpression(expr) ? getFirstNonModuleExportsIdentifier(expr) : undefined; + const expr = aliasDecl && ((isExportAssignment(aliasDecl) || isBinaryExpression(aliasDecl)) ? getExportAssignmentExpression(aliasDecl) : getPropertyAssignmentAliasLikeExpression(aliasDecl as ShorthandPropertyAssignment | PropertyAssignment | PropertyAccessExpression)); + const first = expr && isEntityNameExpression(expr) ? getFirstNonModuleExportsIdentifier(expr) : undefined; const referenced = first && resolveEntityName(first, SymbolFlags.All, /*ignoreErrors*/ true, /*dontResolveAlias*/ true, enclosingDeclaration); if (referenced || target) { includePrivateSymbol(referenced || target); @@ -6744,7 +6932,7 @@ namespace ts { // into the containing scope anyway, so we want to skip the visibility checks. const oldTrack = context.tracker.trackSymbol; context.tracker.trackSymbol = noop; - if (isExportAssignment) { + if (isExportAssignmentCompatibleSymbolName) { results.push(factory.createExportAssignment( /*decorators*/ undefined, /*modifiers*/ undefined, @@ -6753,11 +6941,11 @@ namespace ts { )); } else { - if (first === expr) { + if (first === expr && first) { // serialize as `export {target as name}` serializeExportSpecifier(name, idText(first)); } - else if (isClassExpression(expr)) { + else if (expr && isClassExpression(expr)) { serializeExportSpecifier(name, getInternalSymbolName(target, symbolName(target))); } else { @@ -6783,15 +6971,20 @@ namespace ts { const typeToSerialize = getWidenedType(getTypeOfSymbol(getMergedSymbol(symbol))); if (isTypeRepresentableAsFunctionNamespaceMerge(typeToSerialize, symbol)) { // If there are no index signatures and `typeToSerialize` is an object type, emit as a namespace instead of a const - serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignment ? ModifierFlags.None : ModifierFlags.Export); + serializeAsFunctionNamespaceMerge(typeToSerialize, symbol, varName, isExportAssignmentCompatibleSymbolName ? ModifierFlags.None : ModifierFlags.Export); } else { const statement = factory.createVariableStatement(/*modifiers*/ undefined, factory.createVariableDeclarationList([ factory.createVariableDeclaration(varName, /*exclamationToken*/ undefined, serializeTypeForDeclaration(context, typeToSerialize, symbol, enclosingDeclaration, includePrivateSymbol, bundled)) ], NodeFlags.Const)); - addResult(statement, name === varName ? ModifierFlags.Export : ModifierFlags.None); + // Inlined JSON types exported with [module.]exports= will already emit an export=, so should use `declare`. + // Otherwise, the type itself should be exported. + addResult(statement, + target && target.flags & SymbolFlags.Property && target.escapedName === InternalSymbolName.ExportEquals ? ModifierFlags.Ambient + : name === varName ? ModifierFlags.Export + : ModifierFlags.None); } - if (isExportAssignment) { + if (isExportAssignmentCompatibleSymbolName) { results.push(factory.createExportAssignment( /*decorators*/ undefined, /*modifiers*/ undefined, @@ -6816,7 +7009,8 @@ namespace ts { return getObjectFlags(typeToSerialize) & (ObjectFlags.Anonymous | ObjectFlags.Mapped) && !getIndexInfoOfType(typeToSerialize, IndexKind.String) && !getIndexInfoOfType(typeToSerialize, IndexKind.Number) && - !!(length(getPropertiesOfType(typeToSerialize)) || length(getSignaturesOfType(typeToSerialize, SignatureKind.Call))) && + !isClassInstanceSide(typeToSerialize) && // While a class instance is potentially representable as a NS, prefer printing a reference to the instance type and serializing the class + !!(length(filter(getPropertiesOfType(typeToSerialize), isNamespaceMember)) || length(getSignaturesOfType(typeToSerialize, SignatureKind.Call))) && !length(getSignaturesOfType(typeToSerialize, SignatureKind.Construct)) && // TODO: could probably serialize as function + ns + class, now that that's OK !getDeclarationWithTypeAnnotation(hostSymbol, enclosingDeclaration) && !(typeToSerialize.symbol && some(typeToSerialize.symbol.declarations, d => getSourceFileOfNode(d) !== ctxSrc)) && @@ -6900,7 +7094,7 @@ namespace ts { } // This is an else/if as accessors and properties can't merge in TS, but might in JS // If this happens, we assume the accessor takes priority, as it imposes more constraints - else if (p.flags & (SymbolFlags.Property | SymbolFlags.Variable)) { + else if (p.flags & (SymbolFlags.Property | SymbolFlags.Variable | SymbolFlags.Accessor)) { return setTextRange(createProperty( /*decorators*/ undefined, factory.createModifiersFromModifierFlags((isReadonlySymbol(p) ? ModifierFlags.Readonly : 0) | flag), @@ -7486,6 +7680,8 @@ namespace ts { return !!(target).immediateBaseConstraint; case TypeSystemPropertyName.ResolvedTypeArguments: return !!(target as TypeReference).resolvedTypeArguments; + case TypeSystemPropertyName.ResolvedBaseTypes: + return !!(target as InterfaceType).baseTypesResolved; } return Debug.assertNever(propertyName); } @@ -7678,7 +7874,7 @@ namespace ts { // Use explicitly specified property name ({ p: xxx } form), or otherwise the implied name ({ p } form) const name = declaration.propertyName || declaration.name; const indexType = getLiteralTypeFromPropertyName(name); - const declaredType = getConstraintForLocation(getIndexedAccessType(parentType, indexType, name), declaration.name); + const declaredType = getConstraintForLocation(getIndexedAccessType(parentType, indexType, name, /*aliasSymbol*/ undefined, /*aliasTypeArguments*/ undefined, AccessFlags.ExpressionPosition), declaration.name); type = getFlowTypeOfDestructuring(declaration, declaredType); } } @@ -7686,7 +7882,7 @@ namespace ts { // This elementType will be used if the specific property corresponding to this index is not // present (aka the tuple element property). This call also checks that the parentType is in // fact an iterable or array (depending on target language). - const elementType = checkIteratedTypeOrElementType(IterationUse.Destructuring, parentType, undefinedType, pattern); + const elementType = checkIteratedTypeOrElementType(IterationUse.Destructuring | (declaration.dotDotDotToken ? 0 : IterationUse.PossiblyOutOfBounds), parentType, undefinedType, pattern); const index = pattern.elements.indexOf(declaration); if (declaration.dotDotDotToken) { // If the parent is a tuple type, the rest element has a tuple type of the @@ -7699,7 +7895,7 @@ namespace ts { else if (isArrayLikeType(parentType)) { const indexType = getLiteralType(index); const accessFlags = hasDefaultValue(declaration) ? AccessFlags.NoTupleBoundsCheck : 0; - const declaredType = getConstraintForLocation(getIndexedAccessTypeOrUndefined(parentType, indexType, declaration.name, accessFlags) || errorType, declaration.name); + const declaredType = getConstraintForLocation(getIndexedAccessTypeOrUndefined(parentType, indexType, declaration.name, accessFlags | AccessFlags.ExpressionPosition) || errorType, declaration.name); type = getFlowTypeOfDestructuring(declaration, declaredType); } else { @@ -7867,9 +8063,10 @@ namespace ts { if (symbol.valueDeclaration && isBinaryExpression(symbol.valueDeclaration)) { const links = getSymbolLinks(symbol); if (links.isConstructorDeclaredProperty === undefined) { + links.isConstructorDeclaredProperty = false; links.isConstructorDeclaredProperty = !!getDeclaringConstructor(symbol) && every(symbol.declarations, declaration => isBinaryExpression(declaration) && - getAssignmentDeclarationKind(declaration) === AssignmentDeclarationKind.ThisProperty && + isPossiblyAliasedThisProperty(declaration) && (declaration.left.kind !== SyntaxKind.ElementAccessExpression || isStringOrNumericLiteralLike((declaration.left).argumentExpression)) && !getAnnotatedTypeForAssignmentDeclaration(/*declaredType*/ undefined, declaration, symbol, declaration)); } @@ -7896,7 +8093,10 @@ namespace ts { } function getFlowTypeInConstructor(symbol: Symbol, constructor: ConstructorDeclaration) { - const reference = factory.createPropertyAccessExpression(factory.createThis(), unescapeLeadingUnderscores(symbol.escapedName)); + const accessName = startsWith(symbol.escapedName as string, "__#") + ? factory.createPrivateIdentifier((symbol.escapedName as string).split("@")[1]) + : unescapeLeadingUnderscores(symbol.escapedName); + const reference = factory.createPropertyAccessExpression(factory.createThis(), accessName); setParent(reference.expression, reference); setParent(reference, constructor); reference.flowNode = constructor.returnFlowNode; @@ -7946,7 +8146,7 @@ namespace ts { const kind = isAccessExpression(expression) ? getAssignmentDeclarationPropertyAccessKind(expression) : getAssignmentDeclarationKind(expression); - if (kind === AssignmentDeclarationKind.ThisProperty) { + if (kind === AssignmentDeclarationKind.ThisProperty || isBinaryExpression(expression) && isPossiblyAliasedThisProperty(expression, kind)) { if (isDeclarationInConstructor(expression)) { definedInConstructor = true; } @@ -8066,6 +8266,7 @@ namespace ts { const exportedType = resolveStructuredTypeMembers(type as ObjectType); const members = createSymbolTable(); copyEntries(exportedType.members, members); + const initialSize = members.size; if (resolvedSymbol && !resolvedSymbol.exports) { resolvedSymbol.exports = createSymbolTable(); } @@ -8108,13 +8309,16 @@ namespace ts { } }); const result = createAnonymousType( - exportedType.symbol, + initialSize !== members.size ? undefined : exportedType.symbol, // Only set the type's symbol if it looks to be the same as the original type members, exportedType.callSignatures, exportedType.constructSignatures, exportedType.stringIndexInfo, exportedType.numberIndexInfo); result.objectFlags |= (getObjectFlags(type) & ObjectFlags.JSLiteral); // Propagate JSLiteral flag + if (result.symbol && result.symbol.flags & SymbolFlags.Class && type === getDeclaredTypeOfClassOrInterface(result.symbol)) { + result.objectFlags |= ObjectFlags.IsClassInstanceClone; // Propagate the knowledge that this type is equivalent to the symbol's class instance type + } return result; } if (isEmptyArrayLiteralType(type)) { @@ -8525,9 +8729,9 @@ namespace ts { let links = getSymbolLinks(symbol); const originalLinks = links; if (!links.type) { - const jsDeclaration = symbol.valueDeclaration && getDeclarationOfExpando(symbol.valueDeclaration); - if (jsDeclaration) { - const merged = mergeJSSymbols(symbol, getSymbolOfNode(jsDeclaration)); + const expando = symbol.valueDeclaration && getSymbolOfExpando(symbol.valueDeclaration, /*allowDeclaration*/ false); + if (expando) { + const merged = mergeJSSymbols(symbol, expando); if (merged) { // note:we overwrite links because we just cloned the symbol symbol = links = merged; @@ -8912,22 +9116,36 @@ namespace ts { return resolvedImplementsTypes; } + function reportCircularBaseType(node: Node, type: Type) { + error(node, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString(type, /*enclosingDeclaration*/ undefined, TypeFormatFlags.WriteArrayAsGenericType)); + } + function getBaseTypes(type: InterfaceType): BaseType[] { - if (!type.resolvedBaseTypes) { - if (type.objectFlags & ObjectFlags.Tuple) { - type.resolvedBaseTypes = [getTupleBaseType(type)]; - } - else if (type.symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { - if (type.symbol.flags & SymbolFlags.Class) { - resolveBaseTypesOfClass(type); + if (!type.baseTypesResolved) { + if (pushTypeResolution(type, TypeSystemPropertyName.ResolvedBaseTypes)) { + if (type.objectFlags & ObjectFlags.Tuple) { + type.resolvedBaseTypes = [getTupleBaseType(type)]; } - if (type.symbol.flags & SymbolFlags.Interface) { - resolveBaseTypesOfInterface(type); + else if (type.symbol.flags & (SymbolFlags.Class | SymbolFlags.Interface)) { + if (type.symbol.flags & SymbolFlags.Class) { + resolveBaseTypesOfClass(type); + } + if (type.symbol.flags & SymbolFlags.Interface) { + resolveBaseTypesOfInterface(type); + } + } + else { + Debug.fail("type must be class or interface"); + } + if (!popTypeResolution()) { + for (const declaration of type.symbol.declarations) { + if (declaration.kind === SyntaxKind.ClassDeclaration || declaration.kind === SyntaxKind.InterfaceDeclaration) { + reportCircularBaseType(declaration, type); + } + } } } - else { - Debug.fail("type must be class or interface"); - } + type.baseTypesResolved = true; } return type.resolvedBaseTypes; } @@ -9036,7 +9254,7 @@ namespace ts { } } else { - error(declaration, Diagnostics.Type_0_recursively_references_itself_as_a_base_type, typeToString(type, /*enclosingDeclaration*/ undefined, TypeFormatFlags.WriteArrayAsGenericType)); + reportCircularBaseType(declaration, type); } } else { @@ -9578,7 +9796,7 @@ namespace ts { // fill in any as-yet-unresolved late-bound members. const lateSymbols = createSymbolTable() as UnderscoreEscapedMap; - for (const decl of symbol.declarations) { + for (const decl of symbol.declarations || emptyArray) { const members = getMembersOfDeclaration(decl); if (members) { for (const member of members) { @@ -9594,7 +9812,7 @@ namespace ts { for (const member of decls) { const assignmentKind = getAssignmentDeclarationKind(member as BinaryExpression | CallExpression); const isInstanceMember = assignmentKind === AssignmentDeclarationKind.PrototypeProperty - || assignmentKind === AssignmentDeclarationKind.ThisProperty + || isBinaryExpression(member) && isPossiblyAliasedThisProperty(member, assignmentKind) || assignmentKind === AssignmentDeclarationKind.ObjectDefinePrototypeProperty || assignmentKind === AssignmentDeclarationKind.Prototype; // A straight `Prototype` assignment probably can never have a computed name if (isStatic === !isInstanceMember && hasLateBindableName(member)) { @@ -9734,6 +9952,7 @@ namespace ts { sig.resolvedReturnType = resolvedReturnType; sig.resolvedTypePredicate = resolvedTypePredicate; sig.minArgumentCount = minArgumentCount; + sig.resolvedMinArgumentCount = undefined; sig.target = undefined; sig.mapper = undefined; sig.unionSignatures = undefined; @@ -10201,9 +10420,6 @@ namespace ts { // bound includes those keys that are known to always be present, for example because // because of constraints on type parameters (e.g. 'keyof T' for a constrained T). function getLowerBoundOfKeyType(type: Type): Type { - if (type.flags & (TypeFlags.Any | TypeFlags.Primitive)) { - return type; - } if (type.flags & TypeFlags.Index) { const t = getApparentType((type).type); return isGenericTupleType(t) ? getKnownKeysOfTupleType(t) : getIndexType(t); @@ -10224,7 +10440,7 @@ namespace ts { if (type.flags & TypeFlags.Intersection) { return getIntersectionType(sameMap((type).types, getLowerBoundOfKeyType)); } - return neverType; + return type; } /** Resolve the members of a mapped type { [P in K]: T } */ @@ -10238,6 +10454,7 @@ namespace ts { // and T as the template type. const typeParameter = getTypeParameterFromMappedType(type); const constraintType = getConstraintTypeFromMappedType(type); + const nameType = getNameTypeFromMappedType(type.target || type); const templateType = getTemplateTypeFromMappedType(type.target || type); const modifiersType = getApparentType(getModifiersTypeFromMappedType(type)); // The 'T' in 'keyof T' const templateModifiers = getMappedTypeModifiers(type); @@ -10259,25 +10476,26 @@ namespace ts { } setStructuredTypeMembers(type, members, emptyArray, emptyArray, stringIndexInfo, numberIndexInfo); - function addMemberForKeyType(t: Type) { - // Create a mapper from T to the current iteration type constituent. Then, if the - // mapped type is itself an instantiated type, combine the iteration mapper with the - // instantiation mapper. - const templateMapper = appendTypeMapping(type.mapper, typeParameter, t); + function addMemberForKeyType(keyType: Type) { + const propNameType = nameType ? instantiateType(nameType, appendTypeMapping(type.mapper, typeParameter, keyType)) : keyType; + forEachType(propNameType, t => addMemberForKeyTypeWorker(keyType, t)); + } + + function addMemberForKeyTypeWorker(keyType: Type, propNameType: Type) { // If the current iteration type constituent is a string literal type, create a property. // Otherwise, for type string create a string index signature. - if (isTypeUsableAsPropertyName(t)) { - const propName = getPropertyNameFromType(t); + if (isTypeUsableAsPropertyName(propNameType)) { + const propName = getPropertyNameFromType(propNameType); // String enum members from separate enums with identical values // are distinct types with the same property name. Make the resulting // property symbol's name type be the union of those enum member types. const existingProp = members.get(propName) as MappedSymbol | undefined; if (existingProp) { - existingProp.nameType = getUnionType([existingProp.nameType!, t]); - existingProp.mapper = appendTypeMapping(type.mapper, typeParameter, existingProp.nameType); + existingProp.nameType = getUnionType([existingProp.nameType!, propNameType]); + existingProp.keyType = getUnionType([existingProp.keyType, keyType]); } else { - const modifiersProp = getPropertyOfType(modifiersType, propName); + const modifiersProp = isTypeUsableAsPropertyName(keyType) ? getPropertyOfType(modifiersType, getPropertyNameFromType(keyType)) : undefined; const isOptional = !!(templateModifiers & MappedTypeModifiers.IncludeOptional || !(templateModifiers & MappedTypeModifiers.ExcludeOptional) && modifiersProp && modifiersProp.flags & SymbolFlags.Optional); const isReadonly = !!(templateModifiers & MappedTypeModifiers.IncludeReadonly || @@ -10286,19 +10504,20 @@ namespace ts { const prop = createSymbol(SymbolFlags.Property | (isOptional ? SymbolFlags.Optional : 0), propName, CheckFlags.Mapped | (isReadonly ? CheckFlags.Readonly : 0) | (stripOptional ? CheckFlags.StripOptional : 0)); prop.mappedType = type; + prop.nameType = propNameType; + prop.keyType = keyType; if (modifiersProp) { prop.syntheticOrigin = modifiersProp; prop.declarations = modifiersProp.declarations; } - prop.nameType = t; - prop.mapper = templateMapper; members.set(propName, prop); } } - else if (t.flags & (TypeFlags.Any | TypeFlags.String | TypeFlags.Number | TypeFlags.Enum)) { - const propType = instantiateType(templateType, templateMapper); - if (t.flags & (TypeFlags.Any | TypeFlags.String)) { - stringIndexInfo = createIndexInfo(propType, !!(templateModifiers & MappedTypeModifiers.IncludeReadonly)); + else if (propNameType.flags & (TypeFlags.Any | TypeFlags.String | TypeFlags.Number | TypeFlags.Enum)) { + const propType = instantiateType(templateType, appendTypeMapping(type.mapper, typeParameter, keyType)); + if (propNameType.flags & (TypeFlags.Any | TypeFlags.String)) { + stringIndexInfo = createIndexInfo(stringIndexInfo ? getUnionType([stringIndexInfo.type, propType]) : propType, + !!(templateModifiers & MappedTypeModifiers.IncludeReadonly)); } else { numberIndexInfo = createIndexInfo(numberIndexInfo ? getUnionType([numberIndexInfo.type, propType]) : propType, @@ -10310,11 +10529,14 @@ namespace ts { function getTypeOfMappedSymbol(symbol: MappedSymbol) { if (!symbol.type) { + const mappedType = symbol.mappedType; if (!pushTypeResolution(symbol, TypeSystemPropertyName.Type)) { + mappedType.containsError = true; return errorType; } - const templateType = getTemplateTypeFromMappedType(symbol.mappedType.target || symbol.mappedType); - const propType = instantiateType(templateType, symbol.mapper); + const templateType = getTemplateTypeFromMappedType(mappedType.target || mappedType); + const mapper = appendTypeMapping(mappedType.mapper, getTypeParameterFromMappedType(mappedType), symbol.keyType); + const propType = instantiateType(templateType, mapper); // When creating an optional property in strictNullChecks mode, if 'undefined' isn't assignable to the // type, we include 'undefined' in the type. Similarly, when creating a non-optional property in strictNullChecks // mode, if the underlying property is optional we remove 'undefined' from the type. @@ -10322,11 +10544,10 @@ namespace ts { symbol.checkFlags & CheckFlags.StripOptional ? getTypeWithFacts(propType, TypeFacts.NEUndefined) : propType; if (!popTypeResolution()) { - error(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(symbol.mappedType)); + error(currentNode, Diagnostics.Type_of_property_0_circularly_references_itself_in_mapped_type_1, symbolToString(symbol), typeToString(mappedType)); type = errorType; } symbol.type = type; - symbol.mapper = undefined!; } return symbol.type; } @@ -10341,6 +10562,12 @@ namespace ts { (type.constraintType = getConstraintOfTypeParameter(getTypeParameterFromMappedType(type)) || errorType); } + function getNameTypeFromMappedType(type: MappedType) { + return type.declaration.nameType ? + type.nameType || (type.nameType = instantiateType(getTypeFromTypeNode(type.declaration.nameType), type.mapper)) : + undefined; + } + function getTemplateTypeFromMappedType(type: MappedType) { return type.templateType || (type.templateType = type.declaration.type ? @@ -10634,7 +10861,7 @@ namespace ts { } function getBaseConstraintOfType(type: Type): Type | undefined { - if (type.flags & (TypeFlags.InstantiableNonPrimitive | TypeFlags.UnionOrIntersection)) { + if (type.flags & (TypeFlags.InstantiableNonPrimitive | TypeFlags.UnionOrIntersection | TypeFlags.TemplateLiteral | TypeFlags.StringMapping)) { const constraint = getResolvedBaseConstraint(type); return constraint !== noConstraintType && constraint !== circularConstraintType ? constraint : undefined; } @@ -10673,6 +10900,7 @@ namespace ts { // very high likelihood we're dealing with an infinite generic type that perpetually generates // new type identities as we descend into it. We stop the recursion here and mark this type // and the outer types as having circular constraints. + tracing.instant(tracing.Phase.Check, "getImmediateBaseConstraint_DepthLimit", { typeId: t.id, originalTypeId: type.id, depth: constraintDepth }); error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); nonTerminating = true; return t.immediateBaseConstraint = noConstraintType; @@ -10728,6 +10956,15 @@ namespace ts { if (t.flags & TypeFlags.Index) { return keyofConstraintType; } + if (t.flags & TypeFlags.TemplateLiteral) { + const types = (t).types; + const constraints = mapDefined(types, getBaseConstraint); + return constraints.length === types.length ? getTemplateLiteralType((t).texts, constraints) : stringType; + } + if (t.flags & TypeFlags.StringMapping) { + const constraint = getBaseConstraint((t).type); + return constraint ? getStringMappingType((t).symbol, constraint) : stringType; + } if (t.flags & TypeFlags.IndexedAccess) { const baseObjectType = getBaseConstraint((t).objectType); const baseIndexType = getBaseConstraint((t).indexType); @@ -10805,7 +11042,7 @@ namespace ts { function getResolvedApparentTypeOfMappedType(type: MappedType) { const typeVariable = getHomomorphicTypeVariable(type); - if (typeVariable) { + if (typeVariable && !type.declaration.nameType) { const constraint = getConstraintOfTypeParameter(typeVariable); if (constraint && (isArrayType(constraint) || isTupleType(constraint))) { return instantiateType(type, prependTypeMapping(typeVariable, constraint, type.mapper)); @@ -11192,7 +11429,10 @@ namespace ts { const signature = getSignatureFromDeclaration(node.parent); const parameterIndex = node.parent.parameters.indexOf(node); Debug.assert(parameterIndex >= 0); - return parameterIndex >= getMinArgumentCount(signature, /*strongArityForUntypedJS*/ true); + // Only consider syntactic or instantiated parameters as optional, not `void` parameters as this function is used + // in grammar checks and checking for `void` too early results in parameter types widening too early + // and causes some noImplicitAny errors to be lost. + return parameterIndex >= getMinArgumentCount(signature, MinArgumentCountFlags.StrongArityForUntypedJS | MinArgumentCountFlags.VoidIsNonOptional); } const iife = getImmediatelyInvokedFunctionExpression(node.parent); if (iife) { @@ -11711,12 +11951,12 @@ namespace ts { // (such as 'Foo'), T's constraint is inferred from the constraint of the // corresponding type parameter in 'Foo'. When multiple 'infer T' declarations are // present, we form an intersection of the inferred constraint types. - const grandParent = declaration.parent.parent; + const [childTypeParameter = declaration.parent, grandParent] = walkUpParenthesizedTypesAndGetParentAndChild(declaration.parent.parent); if (grandParent.kind === SyntaxKind.TypeReference) { const typeReference = grandParent; const typeParameters = getTypeParametersForTypeReference(typeReference); if (typeParameters) { - const index = typeReference.typeArguments!.indexOf(declaration.parent); + const index = typeReference.typeArguments!.indexOf(childTypeParameter); if (index < typeParameters.length) { const declaredConstraint = getConstraintOfTypeParameter(typeParameters[index]); if (declaredConstraint) { @@ -11742,6 +11982,11 @@ namespace ts { grandParent.kind === SyntaxKind.NamedTupleMember && (grandParent).dotDotDotToken) { inferences = append(inferences, createArrayType(unknownType)); } + // When an 'infer T' declaration is immediately contained in a string template type, we infer a 'string' + // constraint. + else if (grandParent.kind === SyntaxKind.TemplateLiteralTypeSpan) { + inferences = append(inferences, stringType); + } } } } @@ -11924,6 +12169,9 @@ namespace ts { function getTypeAliasInstantiation(symbol: Symbol, typeArguments: readonly Type[] | undefined): Type { const type = getDeclaredTypeOfSymbol(symbol); + if (type === intrinsicMarkerType && intrinsicTypeKinds.has(symbol.escapedName as string) && typeArguments && typeArguments.length === 1) { + return getStringMappingType(symbol, typeArguments[0]); + } const links = getSymbolLinks(symbol); const typeParameters = links.typeParameters!; const id = getTypeListId(typeArguments); @@ -12017,8 +12265,7 @@ namespace ts { /** * A JSdoc TypeReference may be to a value, but resolve it as a type anyway. - * Note: If the value is imported from commonjs, it should really be an alias, - * but this function's special-case code fakes alias resolution as well. + * Example: import('./b').ConstructorFunction */ function getTypeFromJSDocValueReference(node: NodeWithTypeArguments, symbol: Symbol): Type | undefined { const links = getNodeLinks(node); @@ -12026,19 +12273,9 @@ namespace ts { const valueType = getTypeOfSymbol(symbol); let typeType = valueType; if (symbol.valueDeclaration) { - const decl = getRootDeclaration(symbol.valueDeclaration); - let isRequireAlias = false; - if (isVariableDeclaration(decl) && decl.initializer) { - let expr = decl.initializer; - // skip past entity names, eg `require("x").a.b.c` - while (isPropertyAccessExpression(expr)) { - expr = expr.expression; - } - isRequireAlias = isCallExpression(expr) && isRequireCall(expr, /*requireStringLiteralLikeArgument*/ true) && !!valueType.symbol; - } const isImportTypeWithQualifier = node.kind === SyntaxKind.ImportType && (node as ImportTypeNode).qualifier; // valueType might not have a symbol, eg, {import('./b').STRING_LITERAL} - if (valueType.symbol && (isRequireAlias || isImportTypeWithQualifier)) { + if (valueType.symbol && isImportTypeWithQualifier) { typeType = getTypeReferenceType(node, valueType.symbol); } } @@ -12578,7 +12815,9 @@ namespace ts { // Transform [A, ...(X | Y | Z)] into [A, ...X] | [A, ...Y] | [A, ...Z] const unionIndex = findIndex(elementTypes, (t, i) => !!(target.elementFlags[i] & ElementFlags.Variadic && t.flags & (TypeFlags.Never | TypeFlags.Union))); if (unionIndex >= 0) { - return mapType(elementTypes[unionIndex], t => createNormalizedTupleType(target, replaceElement(elementTypes, unionIndex, t))); + return checkCrossProductUnion(map(elementTypes, (t, i) => target.elementFlags[i] & ElementFlags.Variadic ? t : unknownType)) ? + mapType(elementTypes[unionIndex], t => createNormalizedTupleType(target, replaceElement(elementTypes, unionIndex, t))) : + errorType; } // If there are no variadic elements with non-generic types, just create a type reference with the same target type. const spreadIndex = findIndex(elementTypes, (t, i) => !!(target.elementFlags[i] & ElementFlags.Variadic) && !(t.flags & TypeFlags.InstantiableNonPrimitive) && !isGenericMappedType(t)); @@ -12758,6 +12997,7 @@ namespace ts { // caps union types at 5000 unique literal types and 1000 unique object types. const estimatedCount = (count / (len - i)) * len; if (estimatedCount > (primitivesOnly ? 25000000 : 1000000)) { + tracing.instant(tracing.Phase.Check, "removeSubtypes_DepthLimit", { typeIds: types.map(t => t.id) }); error(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); return false; } @@ -12977,6 +13217,30 @@ namespace ts { return true; } + /** + * Returns `true` if the intersection of the template literals and string literals is the empty set, eg `get${string}` & "setX", and should reduce to `never` + */ + function extractRedundantTemplateLiterals(types: Type[]): boolean { + let i = types.length; + const literals = filter(types, t => !!(t.flags & TypeFlags.StringLiteral)); + while (i > 0) { + i--; + const t = types[i]; + if (!(t.flags & TypeFlags.TemplateLiteral)) continue; + for (const t2 of literals) { + if (isTypeSubtypeOf(t2, t)) { + // eg, ``get${T}` & "getX"` is just `"getX"` + orderedRemoveItemAt(types, i); + break; + } + else if (isPatternLiteralType(t)) { + return true; + } + } + } + return false; + } + function extractIrreducible(types: Type[], flag: TypeFlags) { if (every(types, t => !!(t.flags & TypeFlags.Union) && some((t as UnionType).types, tt => !!(tt.flags & flag)))) { for (let i = 0; i < types.length; i++) { @@ -13115,9 +13379,7 @@ namespace ts { // We are attempting to construct a type of the form X & (A | B) & Y. Transform this into a type of // the form X & A & Y | X & B & Y and recursively reduce until no union type constituents remain. // If the estimated size of the resulting union type exceeds 100000 constituents, report an error. - const size = reduceLeft(typeSet, (n, t) => n * (t.flags & TypeFlags.Union ? (t).types.length : 1), 1); - if (size >= 100000) { - error(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); + if (!checkCrossProductUnion(typeSet)) { return errorType; } const unionIndex = findIndex(typeSet, t => (t.flags & TypeFlags.Union) !== 0); @@ -13127,13 +13389,28 @@ namespace ts { } } else { - result = createIntersectionType(typeSet, aliasSymbol, aliasTypeArguments); + if (includes & TypeFlags.TemplateLiteral && includes & TypeFlags.StringLiteral && extractRedundantTemplateLiterals(typeSet)) { + result = neverType; + } + else { + result = createIntersectionType(typeSet, aliasSymbol, aliasTypeArguments); + } } intersectionTypes.set(id, result); } return result; } + function checkCrossProductUnion(types: readonly Type[]) { + const size = reduceLeft(types, (n, t) => n * (t.flags & TypeFlags.Union ? (t).types.length : t.flags & TypeFlags.Never ? 0 : 1), 1); + if (size >= 100000) { + tracing.instant(tracing.Phase.Check, "checkCrossProductUnion_DepthLimit", { typeIds: types.map(t => t.id), size }); + error(currentNode, Diagnostics.Expression_produces_a_union_type_that_is_too_complex_to_represent); + return false; + } + return true; + } + function getTypeFromIntersectionTypeNode(node: IntersectionTypeNode): Type { const links = getNodeLinks(node); if (!links.resolvedType) { @@ -13157,6 +13434,14 @@ namespace ts { type.resolvedIndexType || (type.resolvedIndexType = createIndexType(type, /*stringsOnly*/ false)); } + function getIndexTypeForMappedType(type: MappedType, noIndexSignatures: boolean | undefined) { + const constraint = filterType(getConstraintTypeFromMappedType(type), t => !(noIndexSignatures && t.flags & (TypeFlags.Any | TypeFlags.String))); + const nameType = type.declaration.nameType && getTypeFromTypeNode(type.declaration.nameType); + return nameType ? + mapType(constraint, t => instantiateType(nameType, appendTypeMapping(type.mapper, getTypeParameterFromMappedType(type), t))) : + constraint; + } + function getLiteralTypeFromPropertyName(name: PropertyName) { if (isPrivateIdentifier(name)) { return neverType; @@ -13205,7 +13490,7 @@ namespace ts { return type.flags & TypeFlags.Union ? getIntersectionType(map((type).types, t => getIndexType(t, stringsOnly, noIndexSignatures))) : type.flags & TypeFlags.Intersection ? getUnionType(map((type).types, t => getIndexType(t, stringsOnly, noIndexSignatures))) : type.flags & TypeFlags.InstantiableNonPrimitive || isGenericTupleType(type) ? getIndexTypeForGenericType(type, stringsOnly) : - getObjectFlags(type) & ObjectFlags.Mapped ? filterType(getConstraintTypeFromMappedType(type), t => !(noIndexSignatures && t.flags & (TypeFlags.Any | TypeFlags.String))) : + getObjectFlags(type) & ObjectFlags.Mapped ? getIndexTypeForMappedType(type, noIndexSignatures) : type === wildcardType ? wildcardType : type.flags & TypeFlags.Unknown ? neverType : type.flags & (TypeFlags.Any | TypeFlags.Never) ? keyofConstraintType : @@ -13250,6 +13535,115 @@ namespace ts { return links.resolvedType; } + function getTypeFromTemplateTypeNode(node: TemplateLiteralTypeNode) { + const links = getNodeLinks(node); + if (!links.resolvedType) { + links.resolvedType = getTemplateLiteralType( + [node.head.text, ...map(node.templateSpans, span => span.literal.text)], + map(node.templateSpans, span => getTypeFromTypeNode(span.type))); + } + return links.resolvedType; + } + + function getTemplateLiteralType(texts: readonly string[], types: readonly Type[]): Type { + const unionIndex = findIndex(types, t => !!(t.flags & (TypeFlags.Never | TypeFlags.Union))); + if (unionIndex >= 0) { + return checkCrossProductUnion(types) ? + mapType(types[unionIndex], t => getTemplateLiteralType(texts, replaceElement(types, unionIndex, t))) : + errorType; + } + const newTypes: Type[] = []; + const newTexts: string[] = []; + let text = texts[0]; + if (!addSpans(texts, types)) { + return stringType; + } + if (newTypes.length === 0) { + return getLiteralType(text); + } + newTexts.push(text); + const id = `${getTypeListId(newTypes)}|${map(newTexts, t => t.length).join(",")}|${newTexts.join("")}`; + let type = templateLiteralTypes.get(id); + if (!type) { + templateLiteralTypes.set(id, type = createTemplateLiteralType(newTexts, newTypes)); + } + return type; + + function addSpans(texts: readonly string[], types: readonly Type[]): boolean { + for (let i = 0; i < types.length; i++) { + const t = types[i]; + if (t.flags & (TypeFlags.Literal | TypeFlags.Null | TypeFlags.Undefined)) { + text += getTemplateStringForType(t) || ""; + text += texts[i + 1]; + } + else if (t.flags & TypeFlags.TemplateLiteral) { + text += (t).texts[0]; + if (!addSpans((t).texts, (t).types)) return false; + text += texts[i + 1]; + } + else if (isGenericIndexType(t) || isPatternLiteralPlaceholderType(t)) { + newTypes.push(t); + newTexts.push(text); + text = texts[i + 1]; + } + else { + return false; + } + } + return true; + } + } + + function getTemplateStringForType(type: Type) { + return type.flags & TypeFlags.StringLiteral ? (type).value : + type.flags & TypeFlags.NumberLiteral ? "" + (type).value : + type.flags & TypeFlags.BigIntLiteral ? pseudoBigIntToString((type).value) : + type.flags & TypeFlags.BooleanLiteral ? (type).intrinsicName : + type.flags & TypeFlags.Null ? "null" : + type.flags & TypeFlags.Undefined ? "undefined" : + undefined; + } + + function createTemplateLiteralType(texts: readonly string[], types: readonly Type[]) { + const type = createType(TypeFlags.TemplateLiteral); + type.texts = texts; + type.types = types; + return type; + } + + function getStringMappingType(symbol: Symbol, type: Type): Type { + return type.flags & (TypeFlags.Union | TypeFlags.Never) ? mapType(type, t => getStringMappingType(symbol, t)) : + isGenericIndexType(type) ? getStringMappingTypeForGenericType(symbol, type) : + type.flags & TypeFlags.StringLiteral ? getLiteralType(applyStringMapping(symbol, (type).value)) : + type; + } + + function applyStringMapping(symbol: Symbol, str: string) { + switch (intrinsicTypeKinds.get(symbol.escapedName as string)) { + case IntrinsicTypeKind.Uppercase: return str.toUpperCase(); + case IntrinsicTypeKind.Lowercase: return str.toLowerCase(); + case IntrinsicTypeKind.Capitalize: return str.charAt(0).toUpperCase() + str.slice(1); + case IntrinsicTypeKind.Uncapitalize: return str.charAt(0).toLowerCase() + str.slice(1); + } + return str; + } + + function getStringMappingTypeForGenericType(symbol: Symbol, type: Type): Type { + const id = `${getSymbolId(symbol)},${getTypeId(type)}`; + let result = stringMappingTypes.get(id); + if (!result) { + stringMappingTypes.set(id, result = createStringMappingType(symbol, type)); + } + return result; + } + + function createStringMappingType(symbol: Symbol, type: Type) { + const result = createType(TypeFlags.StringMapping); + result.symbol = symbol; + result.type = type; + return result; + } + function createIndexedAccessType(objectType: Type, indexType: Type, aliasSymbol: Symbol | undefined, aliasTypeArguments: readonly Type[] | undefined) { const type = createType(TypeFlags.IndexedAccess); type.objectType = objectType; @@ -13302,7 +13696,7 @@ namespace ts { function isUncalledFunctionReference(node: Node, symbol: Symbol) { return !(symbol.flags & (SymbolFlags.Function | SymbolFlags.Method)) || !isCallLikeExpression(findAncestor(node, n => !isAccessExpression(n)) || node.parent) - && every(symbol.declarations, d => !isFunctionLike(d) || !!(d.flags & NodeFlags.Deprecated)); + && every(symbol.declarations, d => !isFunctionLike(d) || !!(getCombinedNodeFlags(d) & NodeFlags.Deprecated)); } function getPropertyTypeForIndexType(originalObjectType: Type, objectType: Type, indexType: Type, fullIndexType: Type, suppressNoImplicitAnyError: boolean, accessNode: ElementAccessExpression | IndexedAccessTypeNode | PropertyName | BindingName | SyntheticExpression | undefined, accessFlags: AccessFlags, reportDeprecated?: boolean) { @@ -13311,7 +13705,7 @@ namespace ts { if (propName !== undefined) { const prop = getPropertyOfType(objectType, propName); if (prop) { - if (reportDeprecated && accessNode && prop.valueDeclaration?.flags & NodeFlags.Deprecated && isUncalledFunctionReference(accessNode, prop)) { + if (reportDeprecated && accessNode && getDeclarationNodeFlagsFromSymbol(prop) & NodeFlags.Deprecated && isUncalledFunctionReference(accessNode, prop)) { const deprecatedNode = accessExpression?.argumentExpression ?? (isIndexedAccessTypeNode(accessNode) ? accessNode.indexType : accessNode); errorOrSuggestion(/* isError */ false, deprecatedNode, Diagnostics._0_is_deprecated, propName as string); } @@ -13361,13 +13755,16 @@ namespace ts { } return undefined; } + const shouldIncludeUndefined = + compilerOptions.noUncheckedIndexedAccess && + (accessFlags & (AccessFlags.Writing | AccessFlags.ExpressionPosition)) === AccessFlags.ExpressionPosition; if (accessNode && !isTypeAssignableToKind(indexType, TypeFlags.String | TypeFlags.Number)) { const indexNode = getIndexNodeForAccessExpression(accessNode); error(indexNode, Diagnostics.Type_0_cannot_be_used_as_an_index_type, typeToString(indexType)); - return indexInfo.type; + return shouldIncludeUndefined ? getUnionType([indexInfo.type, undefinedType]) : indexInfo.type; } errorIfWritingToReadonlyIndex(indexInfo); - return indexInfo.type; + return shouldIncludeUndefined ? getUnionType([indexInfo.type, undefinedType]) : indexInfo.type; } if (indexType.flags & TypeFlags.Never) { return neverType; @@ -13463,6 +13860,14 @@ namespace ts { accessNode; } + function isPatternLiteralPlaceholderType(type: Type) { + return templateConstraintType.types.indexOf(type) !== -1 || !!(type.flags & TypeFlags.Any); + } + + function isPatternLiteralType(type: Type) { + return !!(type.flags & TypeFlags.TemplateLiteral) && every((type as TemplateLiteralType).types, isPatternLiteralPlaceholderType); + } + function isGenericObjectType(type: Type): boolean { if (type.flags & TypeFlags.UnionOrIntersection) { if (!((type).objectFlags & ObjectFlags.IsGenericObjectTypeComputed)) { @@ -13482,7 +13887,7 @@ namespace ts { } return !!((type).objectFlags & ObjectFlags.IsGenericIndexType); } - return !!(type.flags & (TypeFlags.InstantiableNonPrimitive | TypeFlags.Index)); + return !!(type.flags & (TypeFlags.InstantiableNonPrimitive | TypeFlags.Index | TypeFlags.TemplateLiteral | TypeFlags.StringMapping)) && !isPatternLiteralType(type); } function isThisTypeParameter(type: Type): boolean { @@ -13609,8 +14014,8 @@ namespace ts { return instantiateType(getTemplateTypeFromMappedType(objectType), templateMapper); } - function getIndexedAccessType(objectType: Type, indexType: Type, accessNode?: ElementAccessExpression | IndexedAccessTypeNode | PropertyName | BindingName | SyntheticExpression, aliasSymbol?: Symbol, aliasTypeArguments?: readonly Type[]): Type { - return getIndexedAccessTypeOrUndefined(objectType, indexType, accessNode, AccessFlags.None, aliasSymbol, aliasTypeArguments) || (accessNode ? errorType : unknownType); + function getIndexedAccessType(objectType: Type, indexType: Type, accessNode?: ElementAccessExpression | IndexedAccessTypeNode | PropertyName | BindingName | SyntheticExpression, aliasSymbol?: Symbol, aliasTypeArguments?: readonly Type[], accessFlags = AccessFlags.None): Type { + return getIndexedAccessTypeOrUndefined(objectType, indexType, accessNode, accessFlags, aliasSymbol, aliasTypeArguments) || (accessNode ? errorType : unknownType); } function indexTypeLessThan(indexType: Type, limit: number) { @@ -13630,6 +14035,11 @@ namespace ts { if (objectType === wildcardType || indexType === wildcardType) { return wildcardType; } + + const shouldIncludeUndefined = + compilerOptions.noUncheckedIndexedAccess && + (accessFlags & (AccessFlags.Writing | AccessFlags.ExpressionPosition)) === AccessFlags.ExpressionPosition; + // If the object type has a string index signature and no other members we know that the result will // always be the type of that index signature and we can simplify accordingly. if (isStringIndexSignatureOnlyType(objectType) && !(indexType.flags & TypeFlags.Nullable) && isTypeAssignableToKind(indexType, TypeFlags.String | TypeFlags.Number)) { @@ -13653,7 +14063,8 @@ namespace ts { if (!type) { indexedAccessTypes.set(id, type = createIndexedAccessType(objectType, indexType, aliasSymbol, aliasTypeArguments)); } - return type; + + return shouldIncludeUndefined ? getUnionType([type, undefinedType]) : type; } // In the following we resolve T[K] to the type of the property in T selected by K. // We treat boolean as different from other unions to improve errors; @@ -13679,7 +14090,9 @@ namespace ts { if (wasMissingProp) { return undefined; } - return accessFlags & AccessFlags.Writing ? getIntersectionType(propTypes, aliasSymbol, aliasTypeArguments) : getUnionType(propTypes, UnionReduction.Literal, aliasSymbol, aliasTypeArguments); + return accessFlags & AccessFlags.Writing + ? getIntersectionType(propTypes, aliasSymbol, aliasTypeArguments) + : getUnionType(propTypes, UnionReduction.Literal, aliasSymbol, aliasTypeArguments); } return getPropertyTypeForIndexType(objectType, apparentObjectType, indexType, indexType, /* supressNoImplicitAnyError */ false, accessNode, accessFlags | AccessFlags.CacheSymbol, /* reportDeprecated */ true); } @@ -13765,11 +14178,11 @@ namespace ts { if (!(inferredExtendsType.flags & TypeFlags.AnyOrUnknown) && (checkType.flags & TypeFlags.Any || !isTypeAssignableTo(getPermissiveInstantiation(checkType), getPermissiveInstantiation(inferredExtendsType)))) { // Return union of trueType and falseType for 'any' since it matches anything if (checkType.flags & TypeFlags.Any) { - (extraTypes || (extraTypes = [])).push(instantiateTypeWithoutDepthIncrease(root.trueType, combinedMapper || mapper)); + (extraTypes || (extraTypes = [])).push(instantiateType(getTypeFromTypeNode(root.node.trueType), combinedMapper || mapper)); } // If falseType is an immediately nested conditional type that isn't distributive or has an // identical checkType, switch to that type and loop. - const falseType = root.falseType; + const falseType = getTypeFromTypeNode(root.node.falseType); if (falseType.flags & TypeFlags.Conditional) { const newRoot = (falseType).root; if (newRoot.node.parent === root.node && (!newRoot.isDistributive || newRoot.checkType === root.checkType)) { @@ -13777,7 +14190,7 @@ namespace ts { continue; } } - result = instantiateTypeWithoutDepthIncrease(falseType, mapper); + result = instantiateType(falseType, mapper); break; } // Return trueType for a definitely true extends check. We check instantiations of the two @@ -13786,8 +14199,7 @@ namespace ts { // type Foo = T extends { x: string } ? string : number // doesn't immediately resolve to 'string' instead of being deferred. if (inferredExtendsType.flags & TypeFlags.AnyOrUnknown || isTypeDefinitelyAssignableTo(checkType, inferredExtendsType)) { - result = instantiateTypeWithoutDepthIncrease(root.trueType, combinedMapper || mapper); - break; + result = instantiateType(getTypeFromTypeNode(root.node.trueType), combinedMapper || mapper); } } // Return a deferred type for a check that is neither definitely true nor definitely false @@ -13806,15 +14218,15 @@ namespace ts { } function getTrueTypeFromConditionalType(type: ConditionalType) { - return type.resolvedTrueType || (type.resolvedTrueType = instantiateType(type.root.trueType, type.mapper)); + return type.resolvedTrueType || (type.resolvedTrueType = instantiateType(getTypeFromTypeNode(type.root.node.trueType), type.mapper)); } function getFalseTypeFromConditionalType(type: ConditionalType) { - return type.resolvedFalseType || (type.resolvedFalseType = instantiateType(type.root.falseType, type.mapper)); + return type.resolvedFalseType || (type.resolvedFalseType = instantiateType(getTypeFromTypeNode(type.root.node.falseType), type.mapper)); } function getInferredTrueTypeFromConditionalType(type: ConditionalType) { - return type.resolvedInferredTrueType || (type.resolvedInferredTrueType = type.combinedMapper ? instantiateType(type.root.trueType, type.combinedMapper) : getTrueTypeFromConditionalType(type)); + return type.resolvedInferredTrueType || (type.resolvedInferredTrueType = type.combinedMapper ? instantiateType(getTypeFromTypeNode(type.root.node.trueType), type.combinedMapper) : getTrueTypeFromConditionalType(type)); } function getInferTypeParameters(node: ConditionalTypeNode): TypeParameter[] | undefined { @@ -13841,8 +14253,6 @@ namespace ts { node, checkType, extendsType: getTypeFromTypeNode(node.extendsType), - trueType: getTypeFromTypeNode(node.trueType), - falseType: getTypeFromTypeNode(node.falseType), isDistributive: !!(checkType.flags & TypeFlags.TypeParameter), inferTypeParameters: getInferTypeParameters(node), outerTypeParameters, @@ -14059,14 +14469,18 @@ namespace ts { if (merged) { return getSpreadType(merged, right, symbol, objectFlags, readonly); } - return mapType(left, t => getSpreadType(t, right, symbol, objectFlags, readonly)); + return checkCrossProductUnion([left, right]) + ? mapType(left, t => getSpreadType(t, right, symbol, objectFlags, readonly)) + : errorType; } if (right.flags & TypeFlags.Union) { const merged = tryMergeUnionOfObjectTypeAndEmptyObject(right as UnionType, readonly); if (merged) { return getSpreadType(left, merged, symbol, objectFlags, readonly); } - return mapType(right, t => getSpreadType(left, t, symbol, objectFlags, readonly)); + return checkCrossProductUnion([left, right]) + ? mapType(right, t => getSpreadType(left, t, symbol, objectFlags, readonly)) + : errorType; } if (right.flags & (TypeFlags.BooleanLike | TypeFlags.NumberLike | TypeFlags.BigIntLike | TypeFlags.StringLike | TypeFlags.EnumLike | TypeFlags.NonPrimitive | TypeFlags.Index)) { return left; @@ -14202,6 +14616,8 @@ namespace ts { return !!(type.flags & TypeFlags.Literal) && (type).freshType === type; } + function getLiteralType(value: string): StringLiteralType; + function getLiteralType(value: string | number | PseudoBigInt, enumId?: number, symbol?: Symbol): LiteralType; function getLiteralType(value: string | number | PseudoBigInt, enumId?: number, symbol?: Symbol) { // We store all literal types in a single map with keys of the form '#NNN' and '@SSS', // where NNN is the text representation of a numeric literal and SSS are the characters @@ -14346,6 +14762,8 @@ namespace ts { return neverType; case SyntaxKind.ObjectKeyword: return node.flags & NodeFlags.JavaScriptFile && !noImplicitAny ? anyType : nonPrimitiveType; + case SyntaxKind.IntrinsicKeyword: + return intrinsicMarkerType; case SyntaxKind.ThisType: case SyntaxKind.ThisKeyword as TypeNodeSyntaxKind: // TODO(rbuckton): `ThisKeyword` is no longer a `TypeNode`, but we defensively allow it here because of incorrect casts in the Language Service and because of `isPartOfTypeNode`. @@ -14400,6 +14818,8 @@ namespace ts { return getTypeFromConditionalTypeNode(node); case SyntaxKind.InferType: return getTypeFromInferTypeNode(node); + case SyntaxKind.TemplateLiteralType: + return getTypeFromTemplateTypeNode(node); case SyntaxKind.ImportType: return getTypeFromImportTypeNode(node); // This function assumes that an identifier, qualified name, or property access expression is a type expression @@ -14689,13 +15109,18 @@ namespace ts { if (typeVariable !== mappedTypeVariable) { return mapType(getReducedType(mappedTypeVariable), t => { if (t.flags & (TypeFlags.AnyOrUnknown | TypeFlags.InstantiableNonPrimitive | TypeFlags.Object | TypeFlags.Intersection) && t !== wildcardType && t !== errorType) { - if (isGenericTupleType(t)) { - return instantiateMappedGenericTupleType(t, type, typeVariable, mapper); + if (!type.declaration.nameType) { + if (isArrayType(t)) { + return instantiateMappedArrayType(t, type, prependTypeMapping(typeVariable, t, mapper)); + } + if (isGenericTupleType(t)) { + return instantiateMappedGenericTupleType(t, type, typeVariable, mapper); + } + if (isTupleType(t)) { + return instantiateMappedTupleType(t, type, prependTypeMapping(typeVariable, t, mapper)); + } } - const replacementMapper = prependTypeMapping(typeVariable, t, mapper); - return isArrayType(t) ? instantiateMappedArrayType(t, type, replacementMapper) : - isTupleType(t) ? instantiateMappedTupleType(t, type, replacementMapper) : - instantiateAnonymousType(type, replacementMapper); + return instantiateAnonymousType(type, prependTypeMapping(typeVariable, t, mapper)); } return t; }); @@ -14814,6 +15239,7 @@ namespace ts { // We have reached 50 recursive type instantiations and there is a very high likelyhood we're dealing // with a combination of infinite generic types that perpetually generate new type identities. We stop // the recursion here by yielding the error type. + tracing.instant(tracing.Phase.Check, "instantiateType_DepthLimit", { typeId: type.id, instantiationDepth, instantiationCount }); error(currentNode, Diagnostics.Type_instantiation_is_excessively_deep_and_possibly_infinite); return errorType; } @@ -14825,17 +15251,6 @@ namespace ts { return result; } - /** - * This can be used to avoid the penalty on instantiation depth for types which result from immediate - * simplification. It essentially removes the depth increase done in `instantiateType`. - */ - function instantiateTypeWithoutDepthIncrease(type: Type, mapper: TypeMapper | undefined) { - instantiationDepth--; - const result = instantiateType(type, mapper); - instantiationDepth++; - return result; - } - function instantiateTypeWorker(type: Type, mapper: TypeMapper): Type { const flags = type.flags; if (flags & TypeFlags.TypeParameter) { @@ -14864,6 +15279,12 @@ namespace ts { if (flags & TypeFlags.Index) { return getIndexType(instantiateType((type).type, mapper)); } + if (flags & TypeFlags.TemplateLiteral) { + return getTemplateLiteralType((type).texts, instantiateTypes((type).types, mapper)); + } + if (flags & TypeFlags.StringMapping) { + return getStringMappingType((type).symbol, instantiateType((type).type, mapper)); + } if (flags & TypeFlags.IndexedAccess) { return getIndexedAccessType(instantiateType((type).objectType, mapper), instantiateType((type).indexType, mapper), /*accessNode*/ undefined, type.aliasSymbol, instantiateTypes(type.aliasTypeArguments, mapper)); } @@ -15908,6 +16329,7 @@ namespace ts { containingMessageChain?: () => DiagnosticMessageChain | undefined, errorOutputContainer?: { errors?: Diagnostic[], skipLogging?: boolean }, ): boolean { + let errorInfo: DiagnosticMessageChain | undefined; let relatedInfo: [DiagnosticRelatedInformation, ...DiagnosticRelatedInformation[]] | undefined; let maybeKeys: string[]; @@ -15929,6 +16351,7 @@ namespace ts { reportIncompatibleStack(); } if (overflow) { + tracing.instant(tracing.Phase.Check, "checkTypeRelatedTo_DepthLimit", { sourceId: source.id, targetId: target.id, depth }); const diag = error(errorNode || currentNode, Diagnostics.Excessive_stack_depth_comparing_types_0_and_1, typeToString(source), typeToString(target)); if (errorOutputContainer) { (errorOutputContainer.errors || (errorOutputContainer.errors = [])).push(diag); @@ -15970,6 +16393,8 @@ namespace ts { if (errorNode && errorOutputContainer && errorOutputContainer.skipLogging && result === Ternary.False) { Debug.assert(!!errorOutputContainer.errors, "missed opportunity to interact with error."); } + + return result !== Ternary.False; function resetErrorInfo(saved: ReturnType) { @@ -16747,6 +17172,17 @@ namespace ts { return originalHandler!(onlyUnreliable); }; } + + if (expandingFlags === ExpandingFlags.Both) { + tracing.instant(tracing.Phase.Check, "recursiveTypeRelatedTo_DepthLimit", { + sourceId: source.id, + sourceIdStack: sourceStack.map(t => t.id), + targetId: target.id, + targetIdStack: targetStack.map(t => t.id), + depth, + }); + } + const result = expandingFlags !== ExpandingFlags.Both ? structuredTypeRelatedTo(source, target, reportErrors, intersectionState) : Ternary.Maybe; if (outofbandVarianceMarkerHandler) { outofbandVarianceMarkerHandler = originalHandler; @@ -16772,6 +17208,13 @@ namespace ts { } function structuredTypeRelatedTo(source: Type, target: Type, reportErrors: boolean, intersectionState: IntersectionState): Ternary { + tracing.begin(tracing.Phase.Check, "structuredTypeRelatedTo", { sourceId: source.id, targetId: target.id }); + const result = structuredTypeRelatedToWorker(source, target, reportErrors, intersectionState); + tracing.end(); + return result; + } + + function structuredTypeRelatedToWorker(source: Type, target: Type, reportErrors: boolean, intersectionState: IntersectionState): Ternary { if (intersectionState & IntersectionState.PropertyCheck) { return propertiesRelatedTo(source, target, reportErrors, /*excludedProperties*/ undefined, IntersectionState.None); } @@ -16837,7 +17280,8 @@ namespace ts { if (target.flags & TypeFlags.TypeParameter) { // A source type { [P in Q]: X } is related to a target type T if keyof T is related to Q and X is related to T[Q]. - if (getObjectFlags(source) & ObjectFlags.Mapped && isRelatedTo(getIndexType(target), getConstraintTypeFromMappedType(source))) { + if (getObjectFlags(source) & ObjectFlags.Mapped && !(source).declaration.nameType && isRelatedTo(getIndexType(target), getConstraintTypeFromMappedType(source))) { + if (!(getMappedTypeModifiers(source) & MappedTypeModifiers.IncludeOptional)) { const templateType = getTemplateTypeFromMappedType(source); const indexedAccessType = getIndexedAccessType(target, getTypeParameterFromMappedType(source)); @@ -16896,7 +17340,7 @@ namespace ts { } } } - else if (isGenericMappedType(target)) { + else if (isGenericMappedType(target) && !target.declaration.nameType) { // A source type T is related to a target type { [P in X]: T[P] } const template = getTemplateTypeFromMappedType(target); const modifiers = getMappedTypeModifiers(target); @@ -16915,12 +17359,23 @@ namespace ts { if (includeOptional ? !(filteredByApplicability!.flags & TypeFlags.Never) : isRelatedTo(targetConstraint, sourceKeys)) { - const typeParameter = getTypeParameterFromMappedType(target); - const indexingType = filteredByApplicability ? getIntersectionType([filteredByApplicability, typeParameter]) : typeParameter; - const indexedAccessType = getIndexedAccessType(source, indexingType); const templateType = getTemplateTypeFromMappedType(target); - if (result = isRelatedTo(indexedAccessType, templateType, reportErrors)) { - return result; + const typeParameter = getTypeParameterFromMappedType(target); + + // Fastpath: When the template has the form Obj[P] where P is the mapped type parameter, directly compare `source` with `Obj` + // to avoid creating the (potentially very large) number of new intermediate types made by manufacturing `source[P]` + const nonNullComponent = extractTypesOfKind(templateType, ~TypeFlags.Nullable); + if (nonNullComponent.flags & TypeFlags.IndexedAccess && (nonNullComponent as IndexedAccessType).indexType === typeParameter) { + if (result = isRelatedTo(source, (nonNullComponent as IndexedAccessType).objectType, reportErrors)) { + return result; + } + } + else { + const indexingType = filteredByApplicability ? getIntersectionType([filteredByApplicability, typeParameter]) : typeParameter; + const indexedAccessType = getIndexedAccessType(source, indexingType); + if (result = isRelatedTo(indexedAccessType, templateType, reportErrors)) { + return result; + } } } originalErrorInfo = errorInfo; @@ -16928,6 +17383,15 @@ namespace ts { } } } + else if (target.flags & TypeFlags.TemplateLiteral && source.flags & TypeFlags.StringLiteral) { + if (isPatternLiteralType(target)) { + // match all non-`string` segments + const result = inferLiteralsFromTemplateLiteralType(source as StringLiteralType, target as TemplateLiteralType); + if (result && every(result, (r, i) => isStringLiteralTypeValueParsableAsType(r, (target as TemplateLiteralType).types[i]))) { + return Ternary.True; + } + } + } if (source.flags & TypeFlags.TypeVariable) { if (source.flags & TypeFlags.IndexedAccess && target.flags & TypeFlags.IndexedAccess) { @@ -16967,6 +17431,35 @@ namespace ts { return result; } } + else if (source.flags & TypeFlags.TemplateLiteral) { + if (target.flags & TypeFlags.TemplateLiteral && + (source as TemplateLiteralType).texts.length === (target as TemplateLiteralType).texts.length && + (source as TemplateLiteralType).types.length === (target as TemplateLiteralType).types.length && + every((source as TemplateLiteralType).texts, (t, i) => t === (target as TemplateLiteralType).texts[i]) && + every((instantiateType(source, makeFunctionTypeMapper(reportUnreliableMarkers)) as TemplateLiteralType).types, (t, i) => !!((target as TemplateLiteralType).types[i].flags & (TypeFlags.Any | TypeFlags.String)) || !!isRelatedTo(t, (target as TemplateLiteralType).types[i], /*reportErrors*/ false))) { + return Ternary.True; + } + const constraint = getBaseConstraintOfType(source); + if (constraint && constraint !== source && (result = isRelatedTo(constraint, target, reportErrors))) { + resetErrorInfo(saveErrorInfo); + return result; + } + } + else if (source.flags & TypeFlags.StringMapping) { + if (target.flags & TypeFlags.StringMapping && (source).symbol === (target).symbol) { + if (result = isRelatedTo((source).type, (target).type, reportErrors)) { + resetErrorInfo(saveErrorInfo); + return result; + } + } + else { + const constraint = getBaseConstraintOfType(source); + if (constraint && (result = isRelatedTo(constraint, target, reportErrors))) { + resetErrorInfo(saveErrorInfo); + return result; + } + } + } else if (source.flags & TypeFlags.Conditional) { if (target.flags & TypeFlags.Conditional) { // Two conditional types 'T1 extends U1 ? X1 : Y1' and 'T2 extends U2 ? X2 : Y2' are related if @@ -17180,7 +17673,9 @@ namespace ts { const sourceConstraint = instantiateType(getConstraintTypeFromMappedType(source), makeFunctionTypeMapper(getCombinedMappedTypeOptionality(source) < 0 ? reportUnmeasurableMarkers : reportUnreliableMarkers)); if (result = isRelatedTo(targetConstraint, sourceConstraint, reportErrors)) { const mapper = createTypeMapper([getTypeParameterFromMappedType(source)], [getTypeParameterFromMappedType(target)]); - return result & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); + if (instantiateType(getNameTypeFromMappedType(source), mapper) === instantiateType(getNameTypeFromMappedType(target), mapper)) { + return result & isRelatedTo(instantiateType(getTemplateTypeFromMappedType(source), mapper), getTemplateTypeFromMappedType(target), reportErrors); + } } } return Ternary.False; @@ -17211,6 +17706,7 @@ namespace ts { numCombinations *= countTypes(getTypeOfSymbol(sourceProperty)); if (numCombinations > 25) { // We've reached the complexity limit. + tracing.instant(tracing.Phase.Check, "typeRelatedToDiscriminatedType_DepthLimit", { sourceId: source.id, targetId: target.id, numCombinations }); return Ternary.False; } } @@ -17640,8 +18136,9 @@ namespace ts { let result = Ternary.True; const saveErrorInfo = captureErrorCalculationState(); const incompatibleReporter = kind === SignatureKind.Construct ? reportIncompatibleConstructSignatureReturn : reportIncompatibleCallSignatureReturn; - - if (getObjectFlags(source) & ObjectFlags.Instantiated && getObjectFlags(target) & ObjectFlags.Instantiated && source.symbol === target.symbol) { + const sourceObjectFlags = getObjectFlags(source); + const targetObjectFlags = getObjectFlags(target); + if (sourceObjectFlags & ObjectFlags.Instantiated && targetObjectFlags & ObjectFlags.Instantiated && source.symbol === target.symbol) { // We have instantiations of the same anonymous type (which typically will be the type of a // method). Simply do a pairwise comparison of the signatures in the two signature lists instead // of the much more expensive N * M comparison matrix we explore below. We erase type parameters @@ -17661,7 +18158,17 @@ namespace ts { // this regardless of the number of signatures, but the potential costs are prohibitive due // to the quadratic nature of the logic below. const eraseGenerics = relation === comparableRelation || !!compilerOptions.noStrictGenericChecks; - result = signatureRelatedTo(sourceSignatures[0], targetSignatures[0], eraseGenerics, reportErrors, incompatibleReporter(sourceSignatures[0], targetSignatures[0])); + const sourceSignature = first(sourceSignatures); + const targetSignature = first(targetSignatures); + result = signatureRelatedTo(sourceSignature, targetSignature, eraseGenerics, reportErrors, incompatibleReporter(sourceSignature, targetSignature)); + if (!result && reportErrors && kind === SignatureKind.Construct && (sourceObjectFlags & targetObjectFlags) && + (targetSignature.declaration?.kind === SyntaxKind.Constructor || sourceSignature.declaration?.kind === SyntaxKind.Constructor)) { + const constructSignatureToString = (signature: Signature) => + signatureToString(signature, /*enclosingDeclaration*/ undefined, TypeFormatFlags.WriteArrowStyleSignature, kind); + reportError(Diagnostics.Type_0_is_not_assignable_to_type_1, constructSignatureToString(sourceSignature), constructSignatureToString(targetSignature)); + reportError(Diagnostics.Types_of_construct_signatures_are_incompatible); + return result; + } } else { outer: for (const t of targetSignatures) { @@ -17854,12 +18361,12 @@ namespace ts { if (type.flags & TypeFlags.Instantiable) { const constraint = getConstraintOfType(type); - if (constraint) { + if (constraint && constraint !== type) { return typeCouldHaveTopLevelSingletonTypes(constraint); } } - return isUnitType(type); + return isUnitType(type) || !!(type.flags & TypeFlags.TemplateLiteral); } function getBestMatchingType(source: Type, target: UnionOrIntersectionType, isRelatedTo = compareTypesAssignable) { @@ -17894,8 +18401,18 @@ namespace ts { } } const match = discriminable.indexOf(/*searchElement*/ true); + if (match === -1) { + return defaultValue; + } // make sure exactly 1 matches before returning it - return match === -1 || discriminable.indexOf(/*searchElement*/ true, match + 1) !== -1 ? defaultValue : target.types[match]; + let nextMatch = discriminable.indexOf(/*searchElement*/ true, match + 1); + while (nextMatch !== -1) { + if (!isTypeIdenticalTo(target.types[match], target.types[nextMatch])) { + return defaultValue; + } + nextMatch = discriminable.indexOf(/*searchElement*/ true, nextMatch + 1); + } + return target.types[match]; } /** @@ -17950,6 +18467,7 @@ namespace ts { function getVariancesWorker(typeParameters: readonly TypeParameter[] = emptyArray, cache: TCache, createMarkerType: (input: TCache, param: TypeParameter, marker: Type) => Type): VarianceFlags[] { let variances = cache.variances; if (!variances) { + tracing.begin(tracing.Phase.Check, "getVariancesWorker", { arity: typeParameters.length, id: (cache as any).id ?? (cache as any).declaredType?.id ?? -1 }); // The emptyArray singleton is used to signal a recursive invocation. cache.variances = emptyArray; variances = []; @@ -17984,6 +18502,7 @@ namespace ts { variances.push(variance); } cache.variances = variances; + tracing.end(); } return variances; } @@ -18125,56 +18644,55 @@ namespace ts { // has expanded into `[A>>>>>]` // in such cases we need to terminate the expansion, and we do so here. function isDeeplyNestedType(type: Type, stack: Type[], depth: number): boolean { - // We track all object types that have an associated symbol (representing the origin of the type) - if (depth >= 5 && type.flags & TypeFlags.Object) { - if (!isObjectOrArrayLiteralType(type)) { - const symbol = type.symbol; - if (symbol) { - let count = 0; - for (let i = 0; i < depth; i++) { - const t = stack[i]; - if (t.flags & TypeFlags.Object && t.symbol === symbol) { - count++; - if (count >= 5) return true; - } - } - } - } - if (getObjectFlags(type) && ObjectFlags.Reference && !!(type as TypeReference).node) { - const root = (type as TypeReference).target; + if (depth >= 5) { + const identity = getRecursionIdentity(type); + if (identity) { let count = 0; for (let i = 0; i < depth; i++) { - const t = stack[i]; - if (getObjectFlags(t) && ObjectFlags.Reference && !!(t as TypeReference).node && (t as TypeReference).target === root) { + if (getRecursionIdentity(stack[i]) === identity) { count++; - if (count >= 5) return true; + if (count >= 5) { + return true; + } } } } } - if (depth >= 5 && type.flags & TypeFlags.IndexedAccess) { - const root = getRootObjectTypeFromIndexedAccessChain(type); - let count = 0; - for (let i = 0; i < depth; i++) { - const t = stack[i]; - if (getRootObjectTypeFromIndexedAccessChain(t) === root) { - count++; - if (count >= 5) return true; - } - } - } return false; } - /** - * Gets the leftmost object type in a chain of indexed accesses, eg, in A[P][Q], returns A - */ - function getRootObjectTypeFromIndexedAccessChain(type: Type) { - let t = type; - while (t.flags & TypeFlags.IndexedAccess) { - t = (t as IndexedAccessType).objectType; + // Types with constituents that could circularly reference the type have a recursion identity. The recursion + // identity is some object that is common to instantiations of the type with the same origin. + function getRecursionIdentity(type: Type): object | undefined { + if (type.flags & TypeFlags.Object && !isObjectOrArrayLiteralType(type)) { + if (getObjectFlags(type) && ObjectFlags.Reference && (type as TypeReference).node) { + // Deferred type references are tracked through their associated AST node. This gives us finer + // granularity than using their associated target because each manifest type reference has a + // unique AST node. + return (type as TypeReference).node; + } + if (type.symbol && !(getObjectFlags(type) & ObjectFlags.Anonymous && type.symbol.flags & SymbolFlags.Class)) { + // We track all object types that have an associated symbol (representing the origin of the type), but + // exclude the static side of classes from this check since it shares its symbol with the instance side. + return type.symbol; + } + if (isTupleType(type)) { + // Tuple types are tracked through their target type + return type.target; + } } - return t; + if (type.flags & TypeFlags.IndexedAccess) { + // Identity is the leftmost object type in a chain of indexed accesses, eg, in A[P][Q] it is A + do { + type = (type as IndexedAccessType).objectType; + } while (type.flags & TypeFlags.IndexedAccess); + return type; + } + if (type.flags & TypeFlags.Conditional) { + // The root object represents the origin of the conditional type + return (type as ConditionalType).root; + } + return undefined; } function isPropertyIdenticalTo(sourceProp: Symbol, targetProp: Symbol): boolean { @@ -18477,7 +18995,7 @@ namespace ts { } function getEndLengthOfType(type: Type) { - return isTupleType(type) ? getTypeReferenceArity(type) - findLastIndex(type.target.elementFlags, f => !(f & ElementFlags.Required)) - 1 : 0; + return isTupleType(type) ? getTypeReferenceArity(type) - findLastIndex(type.target.elementFlags, f => !(f & (ElementFlags.Required | ElementFlags.Optional))) - 1 : 0; } function getElementTypeOfSliceOfTupleType(type: TupleTypeReference, index: number, endSkipCount = 0, writing = false) { @@ -18539,7 +19057,7 @@ namespace ts { type.flags & TypeFlags.BigInt ? zeroBigIntType : type === regularFalseType || type === falseType || - type.flags & (TypeFlags.Void | TypeFlags.Undefined | TypeFlags.Null) || + type.flags & (TypeFlags.Void | TypeFlags.Undefined | TypeFlags.Null | TypeFlags.AnyOrUnknown) || type.flags & TypeFlags.StringLiteral && (type).value === "" || type.flags & TypeFlags.NumberLiteral && (type).value === 0 || type.flags & TypeFlags.BigIntLiteral && isZeroBigInt(type) ? type : @@ -19079,9 +19597,7 @@ namespace ts { function isTypeParameterAtTopLevel(type: Type, typeParameter: TypeParameter): boolean { return !!(type === typeParameter || type.flags & TypeFlags.UnionOrIntersection && some((type).types, t => isTypeParameterAtTopLevel(t, typeParameter)) || - type.flags & TypeFlags.Conditional && ( - isTypeParameterAtTopLevel(getTrueTypeFromConditionalType(type), typeParameter) || - isTypeParameterAtTopLevel(getFalseTypeFromConditionalType(type), typeParameter))); + type.flags & TypeFlags.Conditional && (getTrueTypeFromConditionalType(type) === typeParameter || getFalseTypeFromConditionalType(type) === typeParameter)); } /** Create an object with properties named in the string literal type. Every property has type `any` */ @@ -19230,18 +19746,76 @@ namespace ts { return !!(type.symbol && some(type.symbol.declarations, hasSkipDirectInferenceFlag)); } + function isValidBigIntString(s: string): boolean { + const scanner = createScanner(ScriptTarget.ESNext, /*skipTrivia*/ false); + let success = true; + scanner.setOnError(() => success = false); + scanner.setText(s + "n"); + let result = scanner.scan(); + if (result === SyntaxKind.MinusToken) { + result = scanner.scan(); + } + const flags = scanner.getTokenFlags(); + // validate that + // * scanning proceeded without error + // * a bigint can be scanned, and that when it is scanned, it is + // * the full length of the input string (so the scanner is one character beyond the augmented input length) + // * it does not contain a numeric seperator (the `BigInt` constructor does not accept a numeric seperator in its input) + return success && result === SyntaxKind.BigIntLiteral && scanner.getTextPos() === (s.length + 1) && !(flags & TokenFlags.ContainsSeparator); + } + + function isStringLiteralTypeValueParsableAsType(s: StringLiteralType, target: Type): boolean { + if (target.flags & TypeFlags.Union) { + return !!forEachType(target, t => isStringLiteralTypeValueParsableAsType(s, t)); + } + switch (target) { + case stringType: return true; + case numberType: return s.value !== "" && isFinite(+(s.value)); + case bigintType: return s.value !== "" && isValidBigIntString(s.value); + // the next 4 should be handled in `getTemplateLiteralType`, as they are all exactly one value, but are here for completeness, just in case + // this function is ever used on types which don't come from template literal holes + case trueType: return s.value === "true"; + case falseType: return s.value === "false"; + case undefinedType: return s.value === "undefined"; + case nullType: return s.value === "null"; + default: return !!(target.flags & TypeFlags.Any); + } + } + + function inferLiteralsFromTemplateLiteralType(source: StringLiteralType, target: TemplateLiteralType): StringLiteralType[] | undefined { + const value = source.value; + const texts = target.texts; + const lastIndex = texts.length - 1; + const startText = texts[0]; + const endText = texts[lastIndex]; + if (!(value.startsWith(startText) && value.slice(startText.length).endsWith(endText))) return undefined; + const matches = []; + const str = value.slice(startText.length, value.length - endText.length); + let pos = 0; + for (let i = 1; i < lastIndex; i++) { + const delim = texts[i]; + const delimPos = delim.length > 0 ? str.indexOf(delim, pos) : pos < str.length ? pos + 1 : -1; + if (delimPos < 0) return undefined; + matches.push(getLiteralType(str.slice(pos, delimPos))); + pos = delimPos + delim.length; + } + matches.push(getLiteralType(str.slice(pos))); + return matches; + } + function inferTypes(inferences: InferenceInfo[], originalSource: Type, originalTarget: Type, priority: InferencePriority = 0, contravariant = false) { - let symbolOrTypeStack: (Symbol | Type)[]; - let visited: ESMap; let bivariant = false; let propagationType: Type; let inferencePriority = InferencePriority.MaxValue; let allowComplexConstraintInference = true; - let objectTypeComparisonDepth = 0; - const targetStack: Type[] = []; + let visited: ESMap; + let sourceStack: object[]; + let targetStack: object[]; + let expandingFlags = ExpandingFlags.None; inferFromTypes(originalSource, originalTarget); function inferFromTypes(source: Type, target: Type): void { + if (!couldContainTypeVariables(target)) { return; } @@ -19397,18 +19971,13 @@ namespace ts { inferFromTypes((source).objectType, (target).objectType); inferFromTypes((source).indexType, (target).indexType); } - else if (source.flags & TypeFlags.Conditional && target.flags & TypeFlags.Conditional) { - inferFromTypes((source).checkType, (target).checkType); - inferFromTypes((source).extendsType, (target).extendsType); - inferFromTypes(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target)); - inferFromTypes(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target)); + else if (source.flags & TypeFlags.StringMapping && target.flags & TypeFlags.StringMapping) { + if ((source).symbol === (target).symbol) { + inferFromTypes((source).type, (target).type); + } } else if (target.flags & TypeFlags.Conditional) { - const savePriority = priority; - priority |= contravariant ? InferencePriority.ContravariantConditional : 0; - const targetTypes = [getTrueTypeFromConditionalType(target), getFalseTypeFromConditionalType(target)]; - inferToMultipleTypes(source, targetTypes, target.flags); - priority = savePriority; + invokeOnce(source, target, inferToConditionalType); } else if (target.flags & TypeFlags.UnionOrIntersection) { inferToMultipleTypes(source, (target).types, target.flags); @@ -19420,6 +19989,9 @@ namespace ts { inferFromTypes(sourceType, target); } } + else if (target.flags & TypeFlags.TemplateLiteral) { + inferToTemplateLiteralType(source, target); + } else { source = getReducedType(source); if (!(priority & InferencePriority.NoConstraints && source.flags & (TypeFlags.Intersection | TypeFlags.Instantiable))) { @@ -19469,7 +20041,24 @@ namespace ts { (visited || (visited = new Map())).set(key, InferencePriority.Circularity); const saveInferencePriority = inferencePriority; inferencePriority = InferencePriority.MaxValue; - action(source, target); + // We stop inferring and report a circularity if we encounter duplicate recursion identities on both + // the source side and the target side. + const saveExpandingFlags = expandingFlags; + const sourceIdentity = getRecursionIdentity(source) || source; + const targetIdentity = getRecursionIdentity(target) || target; + if (sourceIdentity && contains(sourceStack, sourceIdentity)) expandingFlags |= ExpandingFlags.Source; + if (targetIdentity && contains(targetStack, targetIdentity)) expandingFlags |= ExpandingFlags.Target; + if (expandingFlags !== ExpandingFlags.Both) { + if (sourceIdentity) (sourceStack || (sourceStack = [])).push(sourceIdentity); + if (targetIdentity) (targetStack || (targetStack = [])).push(targetIdentity); + action(source, target); + if (targetIdentity) targetStack.pop(); + if (sourceIdentity) sourceStack.pop(); + } + else { + inferencePriority = InferencePriority.Circularity; + } + expandingFlags = saveExpandingFlags; visited.set(key, inferencePriority); inferencePriority = Math.min(inferencePriority, saveInferencePriority); } @@ -19665,41 +20254,33 @@ namespace ts { return false; } - function inferFromObjectTypes(source: Type, target: Type) { - // If we are already processing another target type with the same associated symbol (such as - // an instantiation of the same generic type), we do not explore this target as it would yield - // no further inferences. We exclude the static side of classes from this check since it shares - // its symbol with the instance side which would lead to false positives. - const isNonConstructorObject = target.flags & TypeFlags.Object && - !(getObjectFlags(target) & ObjectFlags.Anonymous && target.symbol && target.symbol.flags & SymbolFlags.Class); - const symbolOrType = getObjectFlags(target) & ObjectFlags.Reference && (target as TypeReference).node ? getNormalizedType(target, /*writing*/ false) : isNonConstructorObject ? isTupleType(target) ? target.target : target.symbol : undefined; - if (symbolOrType) { - if (contains(symbolOrTypeStack, symbolOrType)) { - if (getObjectFlags(target) & ObjectFlags.Reference && (target as TypeReference).node) { - // Don't set the circularity flag for re-encountered recursive type references just because we're already exploring them - return; - } - inferencePriority = InferencePriority.Circularity; - return; - } - targetStack[objectTypeComparisonDepth] = target; - objectTypeComparisonDepth++; - if (isDeeplyNestedType(target, targetStack, objectTypeComparisonDepth)) { - inferencePriority = InferencePriority.Circularity; - objectTypeComparisonDepth--; - return; - } - (symbolOrTypeStack || (symbolOrTypeStack = [])).push(symbolOrType); - inferFromObjectTypesWorker(source, target); - symbolOrTypeStack.pop(); - objectTypeComparisonDepth--; + function inferToConditionalType(source: Type, target: ConditionalType) { + if (source.flags & TypeFlags.Conditional) { + inferFromTypes((source).checkType, target.checkType); + inferFromTypes((source).extendsType, target.extendsType); + inferFromTypes(getTrueTypeFromConditionalType(source), getTrueTypeFromConditionalType(target)); + inferFromTypes(getFalseTypeFromConditionalType(source), getFalseTypeFromConditionalType(target)); } else { - inferFromObjectTypesWorker(source, target); + const savePriority = priority; + priority |= contravariant ? InferencePriority.ContravariantConditional : 0; + const targetTypes = [getTrueTypeFromConditionalType(target), getFalseTypeFromConditionalType(target)]; + inferToMultipleTypes(source, targetTypes, target.flags); + priority = savePriority; } } - function inferFromObjectTypesWorker(source: Type, target: Type) { + function inferToTemplateLiteralType(source: Type, target: TemplateLiteralType) { + const matches = source.flags & TypeFlags.StringLiteral ? inferLiteralsFromTemplateLiteralType(source, target) : + source.flags & TypeFlags.TemplateLiteral && arraysEqual((source).texts, target.texts) ? (source).types : + undefined; + const types = target.types; + for (let i = 0; i < types.length; i++) { + inferFromTypes(matches ? matches[i] : neverType, types[i]); + } + } + + function inferFromObjectTypes(source: Type, target: Type) { if (getObjectFlags(source) & ObjectFlags.Reference && getObjectFlags(target) & ObjectFlags.Reference && ( (source).target === (target).target || isArrayType(source) && isArrayType(target))) { // If source and target are references to the same generic type, infer from type arguments @@ -19711,8 +20292,11 @@ namespace ts { // from S to T and from X to Y. inferFromTypes(getConstraintTypeFromMappedType(source), getConstraintTypeFromMappedType(target)); inferFromTypes(getTemplateTypeFromMappedType(source), getTemplateTypeFromMappedType(target)); + const sourceNameType = getNameTypeFromMappedType(source); + const targetNameType = getNameTypeFromMappedType(target); + if (sourceNameType && targetNameType) inferFromTypes(sourceNameType, targetNameType); } - if (getObjectFlags(target) & ObjectFlags.Mapped) { + if (getObjectFlags(target) & ObjectFlags.Mapped && !(target).declaration.nameType) { const constraintType = getConstraintTypeFromMappedType(target); if (inferToMappedType(source, target, constraintType)) { return; @@ -19764,7 +20348,10 @@ namespace ts { } else if (middleLength === 1 && elementFlags[startLength] & ElementFlags.Variadic) { // Middle of target is exactly one variadic element. Infer the slice between the fixed parts in the source. - inferFromTypes(isTupleType(source) ? sliceTupleType(source, startLength, sourceEndLength) : createArrayType(sourceRestType!), elementTypes[startLength]); + // If target ends in optional element(s), make a lower priority a speculative inference. + const endsInOptional = target.target.elementFlags[targetArity - 1] & ElementFlags.Optional; + const sourceSlice = isTupleType(source) ? sliceTupleType(source, startLength, sourceEndLength) : createArrayType(sourceRestType!); + inferWithPriority(sourceSlice, elementTypes[startLength], endsInOptional ? InferencePriority.SpeculativeTuple : 0); } else if (middleLength === 1 && elementFlags[startLength] & ElementFlags.Rest) { // Middle of target is exactly one rest element. If middle of source is not empty, infer union of middle element types. @@ -19858,7 +20445,7 @@ namespace ts { function hasPrimitiveConstraint(type: TypeParameter): boolean { const constraint = getConstraintOfTypeParameter(type); - return !!constraint && maybeTypeOfKind(constraint.flags & TypeFlags.Conditional ? getDefaultConstraintOfConditionalType(constraint as ConditionalType) : constraint, TypeFlags.Primitive | TypeFlags.Index); + return !!constraint && maybeTypeOfKind(constraint.flags & TypeFlags.Conditional ? getDefaultConstraintOfConditionalType(constraint as ConditionalType) : constraint, TypeFlags.Primitive | TypeFlags.Index | TypeFlags.TemplateLiteral | TypeFlags.StringMapping); } function isObjectLiteralType(type: Type) { @@ -19980,22 +20567,22 @@ namespace ts { return Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom; case "$": return compilerOptions.types - ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig - : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery; + ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery_and_then_add_jquery_to_the_types_field_in_your_tsconfig + : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_save_dev_types_Slashjquery; case "describe": case "suite": case "it": case "test": return compilerOptions.types - ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashjest_or_npm_i_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig - : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashjest_or_npm_i_types_Slashmocha; + ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha_and_then_add_jest_or_mocha_to_the_types_field_in_your_tsconfig + : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_save_dev_types_Slashjest_or_npm_i_save_dev_types_Slashmocha; case "process": case "require": case "Buffer": case "module": return compilerOptions.types - ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig - : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode; + ? Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode_and_then_add_node_to_the_types_field_in_your_tsconfig + : Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_save_dev_types_Slashnode; case "Map": case "Set": case "Promise": @@ -20053,7 +20640,7 @@ namespace ts { const symbol = getResolvedSymbol(node); return symbol !== unknownSymbol ? `${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}|${isConstraintPosition(node) ? "@" : ""}${getSymbolId(symbol)}` : undefined; case SyntaxKind.ThisKeyword: - return "0"; + return `0|${flowContainer ? getNodeId(flowContainer) : "-1"}|${getTypeId(declaredType)}|${getTypeId(initialType)}`; case SyntaxKind.NonNullExpression: case SyntaxKind.ParenthesizedExpression: return getFlowCacheKey((node).expression, declaredType, initialType, flowContainer); @@ -20073,9 +20660,12 @@ namespace ts { case SyntaxKind.ParenthesizedExpression: case SyntaxKind.NonNullExpression: return isMatchingReference(source, (target as NonNullExpression | ParenthesizedExpression).expression); + case SyntaxKind.BinaryExpression: + return isAssignmentExpression(target) && isMatchingReference(source, target.left); } switch (source.kind) { case SyntaxKind.Identifier: + case SyntaxKind.PrivateIdentifier: return target.kind === SyntaxKind.Identifier && getResolvedSymbol(source) === getResolvedSymbol(target) || (target.kind === SyntaxKind.VariableDeclaration || target.kind === SyntaxKind.BindingElement) && getExportSymbolOfValueSymbolIfExported(getResolvedSymbol(source)) === getSymbolOfNode(target); @@ -20320,17 +20910,24 @@ namespace ts { if (!isTypeUsableAsPropertyName(nameType)) return errorType; const text = getPropertyNameFromType(nameType); return getConstraintForLocation(getTypeOfPropertyOfType(type, text), name) || - isNumericLiteralName(text) && getIndexTypeOfType(type, IndexKind.Number) || - getIndexTypeOfType(type, IndexKind.String) || + isNumericLiteralName(text) && includeUndefinedInIndexSignature(getIndexTypeOfType(type, IndexKind.Number)) || + includeUndefinedInIndexSignature(getIndexTypeOfType(type, IndexKind.String)) || errorType; } function getTypeOfDestructuredArrayElement(type: Type, index: number) { return everyType(type, isTupleLikeType) && getTupleElementType(type, index) || - checkIteratedTypeOrElementType(IterationUse.Destructuring, type, undefinedType, /*errorNode*/ undefined) || + includeUndefinedInIndexSignature(checkIteratedTypeOrElementType(IterationUse.Destructuring, type, undefinedType, /*errorNode*/ undefined)) || errorType; } + function includeUndefinedInIndexSignature(type: Type | undefined): Type | undefined { + if (!type) return type; + return compilerOptions.noUncheckedIndexedAccess ? + getUnionType([type, undefinedType]) : + type; + } + function getTypeOfDestructuredSpreadExpression(type: Type) { return createArrayType(checkIteratedTypeOrElementType(IterationUse.Destructuring, type, undefinedType, /*errorNode*/ undefined) || errorType); } @@ -20694,6 +21291,12 @@ namespace ts { return getTypeOfSymbol(symbol); } if (symbol.flags & (SymbolFlags.Variable | SymbolFlags.Property)) { + if (getCheckFlags(symbol) & CheckFlags.Mapped) { + const origin = (symbol).syntheticOrigin; + if (origin && getExplicitTypeOfSymbol(origin)) { + return getTypeOfSymbol(symbol); + } + } const declaration = symbol.valueDeclaration; if (declaration) { if (isDeclarationWithExplicitTypeAnnotation(declaration)) { @@ -20916,7 +21519,7 @@ namespace ts { function getFlowTypeOfReference(reference: Node, declaredType: Type, initialType = declaredType, flowContainer?: Node, couldBeUninitialized?: boolean) { let key: string | undefined; - let keySet = false; + let isKeySet = false; let flowDepth = 0; if (flowAnalysisDisabled) { return errorType; @@ -20939,10 +21542,10 @@ namespace ts { return resultType; function getOrSetCacheKey() { - if (keySet) { + if (isKeySet) { return key; } - keySet = true; + isKeySet = true; return key = getFlowCacheKey(reference, declaredType, initialType, flowContainer); } @@ -20950,6 +21553,7 @@ namespace ts { if (flowDepth === 2000) { // We have made 2000 recursive invocations. To avoid overflowing the call stack we report an error // and disable further control flow analysis in the containing function or module body. + tracing.instant(tracing.Phase.Check, "getTypeAtFlowNode_DepthLimit", { flowId: flow.id }); flowAnalysisDisabled = true; reportFlowControlError(reference); return errorType; @@ -21405,7 +22009,9 @@ namespace ts { } function narrowByInKeyword(type: Type, literal: LiteralExpression, assumeTrue: boolean) { - if (type.flags & (TypeFlags.Union | TypeFlags.Object) || isThisTypeParameter(type)) { + if (type.flags & (TypeFlags.Union | TypeFlags.Object) + || isThisTypeParameter(type) + || type.flags & TypeFlags.Intersection && every((type as IntersectionType).types, t => t.symbol !== globalThisSymbol)) { const propName = escapeLeadingUnderscores(literal.text); return filterType(type, t => isTypePresencePossible(t, propName, assumeTrue)); } @@ -21822,15 +22428,11 @@ namespace ts { return assignableType; } } - // If the candidate type is a subtype of the target type, narrow to the candidate type. - // Otherwise, if the target type is assignable to the candidate type, keep the target type. - // Otherwise, if the candidate type is assignable to the target type, narrow to the candidate - // type. Otherwise, the types are completely unrelated, so narrow to an intersection of the - // two types. - return isTypeSubtypeOf(candidate, type) ? candidate : - isTypeAssignableTo(type, candidate) ? type : - isTypeAssignableTo(candidate, type) ? candidate : - getIntersectionType([type, candidate]); + + // If the candidate type is a subtype of the target type, narrow to the candidate type, + // if the target type is a subtype of the candidate type, narrow to the target type, + // otherwise, narrow to an intersection of the two types. + return isTypeSubtypeOf(candidate, type) ? candidate : isTypeSubtypeOf(type, candidate) ? type : getIntersectionType([type, candidate]); } function narrowTypeByCallExpression(type: Type, callExpression: CallExpression, assumeTrue: boolean): Type { @@ -22068,7 +22670,7 @@ namespace ts { const localOrExportSymbol = getExportSymbolOfValueSymbolIfExported(symbol); let declaration: Declaration | undefined = localOrExportSymbol.valueDeclaration; - if (declaration?.flags & NodeFlags.Deprecated && isUncalledFunctionReference(node.parent, localOrExportSymbol)) { + if (declaration && getCombinedNodeFlags(declaration) & NodeFlags.Deprecated && isUncalledFunctionReference(node.parent, localOrExportSymbol)) { errorOrSuggestion(/* isError */ false, node, Diagnostics._0_is_deprecated, node.escapedText as string);; } if (localOrExportSymbol.flags & SymbolFlags.Class) { @@ -22876,7 +23478,11 @@ namespace ts { return getContextuallyTypedParameterType(declaration); case SyntaxKind.BindingElement: return getContextualTypeForBindingElement(declaration); - // By default, do nothing and return undefined - only parameters and binding elements have context implied by a parent + case SyntaxKind.PropertyDeclaration: + if (hasSyntacticModifier(declaration, ModifierFlags.Static)) { + return getContextualTypeForStaticPropertyDeclaration(declaration); + } + // By default, do nothing and return undefined - only the above cases have context implied by a parent } } @@ -22885,13 +23491,23 @@ namespace ts { const name = declaration.propertyName || declaration.name; const parentType = getContextualTypeForVariableLikeDeclaration(parent) || parent.kind !== SyntaxKind.BindingElement && parent.initializer && checkDeclarationInitializer(parent); - if (parentType && !isBindingPattern(name) && !isComputedNonLiteralName(name)) { - const nameType = getLiteralTypeFromPropertyName(name); - if (isTypeUsableAsPropertyName(nameType)) { - const text = getPropertyNameFromType(nameType); - return getTypeOfPropertyOfType(parentType, text); - } + if (!parentType || isBindingPattern(name) || isComputedNonLiteralName(name)) return undefined; + if (parent.name.kind === SyntaxKind.ArrayBindingPattern) { + const index = indexOfNode(declaration.parent.elements, declaration); + if (index < 0) return undefined; + return getContextualTypeForElementExpression(parentType, index); } + const nameType = getLiteralTypeFromPropertyName(name); + if (isTypeUsableAsPropertyName(nameType)) { + const text = getPropertyNameFromType(nameType); + return getTypeOfPropertyOfType(parentType, text); + } + } + + function getContextualTypeForStaticPropertyDeclaration(declaration: PropertyDeclaration): Type | undefined { + const parentType = isExpression(declaration.parent) && getContextualType(declaration.parent); + if (!parentType) return undefined; + return getTypeOfPropertyOfContextualType(parentType, getSymbolOfNode(declaration).escapedName); } // In a variable, parameter or property declaration with a type annotation, @@ -22919,18 +23535,25 @@ namespace ts { function getContextualTypeForReturnExpression(node: Expression): Type | undefined { const func = getContainingFunction(node); if (func) { - const functionFlags = getFunctionFlags(func); - if (functionFlags & FunctionFlags.Generator) { // AsyncGenerator function or Generator function - return undefined; - } - - const contextualReturnType = getContextualReturnType(func); + let contextualReturnType = getContextualReturnType(func); if (contextualReturnType) { - if (functionFlags & FunctionFlags.Async) { // Async function - const contextualAwaitedType = mapType(contextualReturnType, getAwaitedTypeOfPromise); + const functionFlags = getFunctionFlags(func); + if (functionFlags & FunctionFlags.Generator) { // Generator or AsyncGenerator function + const use = functionFlags & FunctionFlags.Async ? IterationUse.AsyncGeneratorReturnType : IterationUse.GeneratorReturnType; + const iterationTypes = getIterationTypesOfIterable(contextualReturnType, use, /*errorNode*/ undefined); + if (!iterationTypes) { + return undefined; + } + contextualReturnType = iterationTypes.returnType; + // falls through to unwrap Promise for AsyncGenerators + } + + if (functionFlags & FunctionFlags.Async) { // Async function or AsyncGenerator function + const contextualAwaitedType = mapType(contextualReturnType, getAwaitedType); return contextualAwaitedType && getUnionType([contextualAwaitedType, createPromiseLikeType(contextualAwaitedType)]); } - return contextualReturnType; // Regular function + + return contextualReturnType; // Regular function or Generator function } } return undefined; @@ -23037,14 +23660,7 @@ namespace ts { case SyntaxKind.AmpersandAmpersandEqualsToken: case SyntaxKind.BarBarEqualsToken: case SyntaxKind.QuestionQuestionEqualsToken: - if (node !== right) { - return undefined; - } - const contextSensitive = getIsContextSensitiveAssignmentOrContextType(binaryExpression); - if (!contextSensitive) { - return undefined; - } - return contextSensitive === true ? getTypeOfExpression(left) : contextSensitive; + return node === right ? getContextualTypeForAssignmentDeclaration(binaryExpression) : undefined; case SyntaxKind.BarBarToken: case SyntaxKind.QuestionQuestionToken: // When an || expression has a contextual type, the operands are contextually typed by that type, except @@ -23065,24 +23681,27 @@ namespace ts { // In an assignment expression, the right operand is contextually typed by the type of the left operand. // Don't do this for assignment declarations unless there is a type tag on the assignment, to avoid circularity from checking the right operand. - function getIsContextSensitiveAssignmentOrContextType(binaryExpression: BinaryExpression): boolean | Type { + function getContextualTypeForAssignmentDeclaration(binaryExpression: BinaryExpression): Type | undefined { const kind = getAssignmentDeclarationKind(binaryExpression); switch (kind) { case AssignmentDeclarationKind.None: - return true; + return getTypeOfExpression(binaryExpression.left); case AssignmentDeclarationKind.Property: case AssignmentDeclarationKind.ExportsProperty: case AssignmentDeclarationKind.Prototype: case AssignmentDeclarationKind.PrototypeProperty: + if (isPossiblyAliasedThisProperty(binaryExpression, kind)) { + return getContextualTypeForThisPropertyAssignment(binaryExpression, kind); + } // If `binaryExpression.left` was assigned a symbol, then this is a new declaration; otherwise it is an assignment to an existing declaration. // See `bindStaticPropertyAssignment` in `binder.ts`. - if (!binaryExpression.left.symbol) { - return true; + else if (!binaryExpression.left.symbol) { + return getTypeOfExpression(binaryExpression.left); } else { const decl = binaryExpression.left.symbol.valueDeclaration; if (!decl) { - return false; + return undefined; } const lhs = cast(binaryExpression.left, isAccessExpression); const overallAnnotation = getEffectiveTypeAnnotationNode(decl); @@ -23097,35 +23716,17 @@ namespace ts { if (annotated) { const nameStr = getElementOrPropertyAccessName(lhs); if (nameStr !== undefined) { - const type = getTypeOfPropertyOfContextualType(getTypeFromTypeNode(annotated), nameStr); - return type || false; + return getTypeOfPropertyOfContextualType(getTypeFromTypeNode(annotated), nameStr); } } - return false; + return undefined; } } - return !isInJSFile(decl); + return isInJSFile(decl) ? undefined : getTypeOfExpression(binaryExpression.left); } case AssignmentDeclarationKind.ModuleExports: case AssignmentDeclarationKind.ThisProperty: - if (!binaryExpression.symbol) return true; - if (binaryExpression.symbol.valueDeclaration) { - const annotated = getEffectiveTypeAnnotationNode(binaryExpression.symbol.valueDeclaration); - if (annotated) { - const type = getTypeFromTypeNode(annotated); - if (type) { - return type; - } - } - } - if (kind === AssignmentDeclarationKind.ModuleExports) return false; - const thisAccess = cast(binaryExpression.left, isAccessExpression); - if (!isObjectLiteralMethod(getThisContainer(thisAccess.expression, /*includeArrowFunctions*/ false))) { - return false; - } - const thisType = checkThisExpression(thisAccess.expression); - const nameStr = getElementOrPropertyAccessName(thisAccess); - return nameStr !== undefined && thisType && getTypeOfPropertyOfContextualType(thisType, nameStr) || false; + return getContextualTypeForThisPropertyAssignment(binaryExpression, kind); case AssignmentDeclarationKind.ObjectDefinePropertyValue: case AssignmentDeclarationKind.ObjectDefinePropertyExports: case AssignmentDeclarationKind.ObjectDefinePrototypeProperty: @@ -23135,6 +23736,40 @@ namespace ts { } } + function isPossiblyAliasedThisProperty(declaration: BinaryExpression, kind = getAssignmentDeclarationKind(declaration)) { + if (kind === AssignmentDeclarationKind.ThisProperty) { + return true; + } + if (!isInJSFile(declaration) || kind !== AssignmentDeclarationKind.Property || !isIdentifier((declaration.left as AccessExpression).expression)) { + return false; + } + const name = ((declaration.left as AccessExpression).expression as Identifier).escapedText; + const symbol = resolveName(declaration.left, name, SymbolFlags.Value, undefined, undefined, /*isUse*/ true, /*excludeGlobals*/ true); + return isThisInitializedDeclaration(symbol?.valueDeclaration); + } + + function getContextualTypeForThisPropertyAssignment(binaryExpression: BinaryExpression, kind: AssignmentDeclarationKind): Type | undefined { + if (!binaryExpression.symbol) return getTypeOfExpression(binaryExpression.left); + if (binaryExpression.symbol.valueDeclaration) { + const annotated = getEffectiveTypeAnnotationNode(binaryExpression.symbol.valueDeclaration); + if (annotated) { + const type = getTypeFromTypeNode(annotated); + if (type) { + return type; + } + } + } + if (kind === AssignmentDeclarationKind.ModuleExports) return undefined; + const thisAccess = cast(binaryExpression.left, isAccessExpression); + if (!isObjectLiteralMethod(getThisContainer(thisAccess.expression, /*includeArrowFunctions*/ false))) { + return undefined; + } + const thisType = checkThisExpression(thisAccess.expression); + const nameStr = getElementOrPropertyAccessName(thisAccess); + return nameStr !== undefined && getTypeOfPropertyOfContextualType(thisType, nameStr) || undefined; + + } + function isCircularMappedProperty(symbol: Symbol) { return !!(getCheckFlags(symbol) & CheckFlags.Mapped && !(symbol).type && findResolutionCycleStartIndex(symbol, TypeSystemPropertyName.Type) >= 0); } @@ -23210,7 +23845,10 @@ namespace ts { function getContextualTypeForElementExpression(arrayContextualType: Type | undefined, index: number): Type | undefined { return arrayContextualType && ( getTypeOfPropertyOfContextualType(arrayContextualType, "" + index as __String) - || getIteratedTypeOrElementType(IterationUse.Element, arrayContextualType, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false)); + || mapType( + arrayContextualType, + t => getIteratedTypeOrElementType(IterationUse.Element, t, undefinedType, /*errorNode*/ undefined, /*checkAssignability*/ false), + /*noReductions*/ true)); } // In a contextually typed conditional expression, the true/false expressions are contextually typed by the same type. @@ -24085,7 +24723,6 @@ namespace ts { function checkJsxSelfClosingElementDeferred(node: JsxSelfClosingElement) { checkJsxOpeningLikeElementOrOpeningFragment(node); - resolveUntypedCall(node); // ensure type arguments and parameters are typechecked, even if there is an arity error } function checkJsxSelfClosingElement(node: JsxSelfClosingElement, _checkMode: CheckMode | undefined): Type { @@ -24120,7 +24757,7 @@ namespace ts { // by default, jsx:'react' will use jsxFactory = React.createElement and jsxFragmentFactory = React.Fragment // if jsxFactory compiler option is provided, ensure jsxFragmentFactory compiler option or @jsxFrag pragma is provided too const nodeSourceFile = getSourceFileOfNode(node); - if (compilerOptions.jsx === JsxEmit.React && (compilerOptions.jsxFactory || nodeSourceFile.pragmas.has("jsx")) + if (getJSXTransformEnabled(compilerOptions) && (compilerOptions.jsxFactory || nodeSourceFile.pragmas.has("jsx")) && !compilerOptions.jsxFragmentFactory && !nodeSourceFile.pragmas.has("jsxfrag")) { error(node, compilerOptions.jsxFactory ? Diagnostics.The_jsxFragmentFactory_compiler_option_must_be_provided_to_use_JSX_fragments_with_the_jsxFactory_compiler_option @@ -24178,7 +24815,7 @@ namespace ts { const exprType = checkJsxAttribute(attributeDecl, checkMode); objectFlags |= getObjectFlags(exprType) & ObjectFlags.PropagatingFlags; - const attributeSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient | member.flags, member.escapedName); + const attributeSymbol = createSymbol(SymbolFlags.Property | member.flags, member.escapedName); attributeSymbol.declarations = member.declarations; attributeSymbol.parent = member.parent; if (member.valueDeclaration) { @@ -24237,7 +24874,7 @@ namespace ts { const contextualType = getApparentTypeOfContextualType(openingLikeElement.attributes); const childrenContextualType = contextualType && getTypeOfPropertyOfContextualType(contextualType, jsxChildrenPropertyName); // If there are children in the body of JSX element, create dummy attribute "children" with the union of children types so that it will pass the attribute checking process - const childrenPropSymbol = createSymbol(SymbolFlags.Property | SymbolFlags.Transient, jsxChildrenPropertyName); + const childrenPropSymbol = createSymbol(SymbolFlags.Property, jsxChildrenPropertyName); childrenPropSymbol.type = childrenTypes.length === 1 ? childrenTypes[0] : childrenContextualType && forEachType(childrenContextualType, isTupleLikeType) ? createTupleType(childrenTypes) : createArrayType(getUnionType(childrenTypes)); @@ -24610,7 +25247,7 @@ namespace ts { if (isNodeOpeningLikeElement) { const jsxOpeningLikeNode = node as JsxOpeningLikeElement; const sig = getResolvedSignature(jsxOpeningLikeNode); - checkDeprecatedSignature(sig, node); + checkDeprecatedSignature(sig, node); checkJsxReturnAssignableToAppropriateBound(getJsxReferenceKind(jsxOpeningLikeNode), getReturnTypeOfSignature(sig), jsxOpeningLikeNode); } } @@ -24970,7 +25607,8 @@ namespace ts { } function isThisPropertyAccessInConstructor(node: ElementAccessExpression | PropertyAccessExpression | QualifiedName, prop: Symbol) { - return isThisProperty(node) && (isAutoTypedProperty(prop) || isConstructorDeclaredProperty(prop)) && getThisContainer(node, /*includeArrowFunctions*/ true) === getDeclaringConstructor(prop); + return (isConstructorDeclaredProperty(prop) || isThisProperty(node) && isAutoTypedProperty(prop)) + && getThisContainer(node, /*includeArrowFunctions*/ true) === getDeclaringConstructor(prop); } function checkPropertyAccessExpressionOrQualifiedName(node: PropertyAccessExpression | QualifiedName, left: Expression | QualifiedName, leftType: Type, right: Identifier | PrivateIdentifier) { @@ -25036,13 +25674,13 @@ namespace ts { if (indexInfo.isReadonly && (isAssignmentTarget(node) || isDeleteTarget(node))) { error(node, Diagnostics.Index_signature_in_type_0_only_permits_reading, typeToString(apparentType)); } - propType = indexInfo.type; + + propType = (compilerOptions.noUncheckedIndexedAccess && !isAssignmentTarget(node)) ? getUnionType([indexInfo.type, undefinedType]) : indexInfo.type; } else { - if (prop.valueDeclaration?.flags & NodeFlags.Deprecated && isUncalledFunctionReference(node, prop)) { + if (getDeclarationNodeFlagsFromSymbol(prop) & NodeFlags.Deprecated && isUncalledFunctionReference(node, prop)) { errorOrSuggestion(/* isError */ false, right, Diagnostics._0_is_deprecated, right.escapedText as string); } - checkPropertyNotUsedBeforeDeclaration(prop, node, right); markPropertyAsReferenced(prop, node, left.kind === SyntaxKind.ThisKeyword); getNodeLinks(node).resolvedSymbol = prop; @@ -25476,7 +26114,7 @@ namespace ts { const accessFlags = isAssignmentTarget(node) ? AccessFlags.Writing | (isGenericObjectType(objectType) && !isThisTypeParameter(objectType) ? AccessFlags.NoIndexSignatures : 0) : AccessFlags.None; - const indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, node, accessFlags) || errorType; + const indexedAccessType = getIndexedAccessTypeOrUndefined(objectType, effectiveIndexType, node, accessFlags | AccessFlags.ExpressionPosition) || errorType; return checkIndexedAccessIndexType(getFlowTypeOfAccessExpression(node, indexedAccessType.symbol, indexedAccessType, indexExpression), node); } @@ -25618,6 +26256,10 @@ namespace ts { return !!(t.flags & TypeFlags.Void); } + function acceptsVoidUndefinedUnknownOrAny(t: Type): boolean { + return !!(t.flags & (TypeFlags.Void | TypeFlags.Undefined | TypeFlags.Unknown | TypeFlags.Any)); + } + function hasCorrectArity(node: CallLikeExpression, args: readonly Expression[], signature: Signature, signatureHelpTrailingComma = false) { let argCount: number; let callIsIncomplete = false; // In incomplete call we want to be lenient when we have too few arguments @@ -25683,7 +26325,7 @@ namespace ts { } for (let i = argCount; i < effectiveMinimumArguments; i++) { const type = getTypeAtPosition(signature, i); - if (filterType(type, acceptsVoid).flags & TypeFlags.Never) { + if (filterType(type, isInJSFile(node) && !strictNullChecks ? acceptsVoidUndefinedUnknownOrAny : acceptsVoid).flags & TypeFlags.Never) { return false; } } @@ -25864,7 +26506,7 @@ namespace ts { else { const contextualType = getIndexedAccessType(restType, getLiteralType(i - index)); const argType = checkExpressionWithContextualType(arg, contextualType, context, checkMode); - const hasPrimitiveContextualType = maybeTypeOfKind(contextualType, TypeFlags.Primitive | TypeFlags.Index); + const hasPrimitiveContextualType = maybeTypeOfKind(contextualType, TypeFlags.Primitive | TypeFlags.Index | TypeFlags.TemplateLiteral | TypeFlags.StringMapping); types.push(hasPrimitiveContextualType ? getRegularTypeOfLiteralType(argType) : getWidenedLiteralType(argType)); flags.push(ElementFlags.Required); } @@ -26264,6 +26906,22 @@ namespace ts { } } + function isPromiseResolveArityError(node: CallLikeExpression) { + if (!isCallExpression(node) || !isIdentifier(node.expression)) return false; + + const symbol = resolveName(node.expression, node.expression.escapedText, SymbolFlags.Value, undefined, undefined, false); + const decl = symbol?.valueDeclaration; + if (!decl || !isParameter(decl) || !isFunctionExpressionOrArrowFunction(decl.parent) || !isNewExpression(decl.parent.parent) || !isIdentifier(decl.parent.parent.expression)) { + return false; + } + + const globalPromiseSymbol = getGlobalPromiseConstructorSymbol(/*reportErrors*/ false); + if (!globalPromiseSymbol) return false; + + const constructorSymbol = getSymbolAtLocation(decl.parent.parent.expression, /*ignoreErrors*/ true); + return constructorSymbol === globalPromiseSymbol; + } + function getArgumentArityError(node: CallLikeExpression, signatures: readonly Signature[], args: readonly Expression[]) { let min = Number.POSITIVE_INFINITY; let max = Number.NEGATIVE_INFINITY; @@ -26296,16 +26954,23 @@ namespace ts { let spanArray: NodeArray; let related: DiagnosticWithLocation | undefined; - const error = hasRestParameter || hasSpreadArgument ? hasRestParameter && hasSpreadArgument ? Diagnostics.Expected_at_least_0_arguments_but_got_1_or_more : - hasRestParameter ? Diagnostics.Expected_at_least_0_arguments_but_got_1 : - Diagnostics.Expected_0_arguments_but_got_1_or_more : Diagnostics.Expected_0_arguments_but_got_1; + const error = hasRestParameter || hasSpreadArgument ? + hasRestParameter && hasSpreadArgument ? + Diagnostics.Expected_at_least_0_arguments_but_got_1_or_more : + hasRestParameter ? + Diagnostics.Expected_at_least_0_arguments_but_got_1 : + Diagnostics.Expected_0_arguments_but_got_1_or_more : + paramRange === 1 && argCount === 0 && isPromiseResolveArityError(node) ? + Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise : + Diagnostics.Expected_0_arguments_but_got_1; if (closestSignature && getMinArgumentCount(closestSignature) > argCount && closestSignature.declaration) { const paramDecl = closestSignature.declaration.parameters[closestSignature.thisParameter ? argCount + 1 : argCount]; if (paramDecl) { related = createDiagnosticForNode( paramDecl, - isBindingPattern(paramDecl.name) ? Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided : Diagnostics.An_argument_for_0_was_not_provided, + isBindingPattern(paramDecl.name) ? Diagnostics.An_argument_matching_this_binding_pattern_was_not_provided : + isRestParameter(paramDecl) ? Diagnostics.Arguments_for_the_rest_parameter_0_were_not_provided : Diagnostics.An_argument_for_0_was_not_provided, !paramDecl.name ? argCount : !isBindingPattern(paramDecl.name) ? idText(getFirstIdentifier(paramDecl.name)) : undefined ); } @@ -26373,7 +27038,7 @@ namespace ts { const isTaggedTemplate = node.kind === SyntaxKind.TaggedTemplateExpression; const isDecorator = node.kind === SyntaxKind.Decorator; const isJsxOpeningOrSelfClosingElement = isJsxOpeningLikeElement(node); - const reportErrors = !candidatesOutArray; + const reportErrors = !candidatesOutArray && produceDiagnostics; let typeArguments: NodeArray | undefined; @@ -27268,6 +27933,10 @@ namespace ts { const result = getIntrinsicAttributesTypeFromJsxOpeningLikeElement(node); const fakeSignature = createSignatureForJSXIntrinsic(node, result); checkTypeAssignableToAndOptionallyElaborate(checkExpressionWithContextualType(node.attributes, getEffectiveFirstArgumentForJsxSignature(fakeSignature, node), /*mapper*/ undefined, CheckMode.Normal), result, node.tagName, node.attributes); + if (length(node.typeArguments)) { + forEach(node.typeArguments, checkSourceElement); + diagnostics.add(createDiagnosticForNodeArray(getSourceFileOfNode(node), node.typeArguments!, Diagnostics.Expected_0_type_arguments_but_got_1, 0, length(node.typeArguments))); + } return fakeSignature; } const exprTypes = checkExpression(node.tagName); @@ -27393,15 +28062,59 @@ namespace ts { } function getAssignedClassSymbol(decl: Declaration): Symbol | undefined { - const assignmentSymbol = decl && decl.parent && - (isFunctionDeclaration(decl) && getSymbolOfNode(decl) || - isBinaryExpression(decl.parent) && getSymbolOfNode(decl.parent.left) || - isVariableDeclaration(decl.parent) && getSymbolOfNode(decl.parent)); - const prototype = assignmentSymbol && assignmentSymbol.exports && assignmentSymbol.exports.get("prototype" as __String); - const init = prototype && prototype.valueDeclaration && getAssignedJSPrototype(prototype.valueDeclaration); + const assignmentSymbol = decl && getSymbolOfExpando(decl, /*allowDeclaration*/ true); + const prototype = assignmentSymbol?.exports?.get("prototype" as __String); + const init = prototype?.valueDeclaration && getAssignedJSPrototype(prototype.valueDeclaration); return init ? getSymbolOfNode(init) : undefined; } + function getSymbolOfExpando(node: Node, allowDeclaration: boolean): Symbol | undefined { + if (!node.parent) { + return undefined; + } + let name: Expression | BindingName | undefined; + let decl: Node | undefined; + if (isVariableDeclaration(node.parent) && node.parent.initializer === node) { + if (!isInJSFile(node) && !isVarConst(node.parent)) { + return undefined; + } + name = node.parent.name; + decl = node.parent; + } + else if (isBinaryExpression(node.parent)) { + const parentNode = node.parent; + const parentNodeOperator = node.parent.operatorToken.kind; + if (parentNodeOperator === SyntaxKind.EqualsToken && (allowDeclaration || parentNode.right === node)) { + name = parentNode.left; + decl = name; + } + else if (parentNodeOperator === SyntaxKind.BarBarToken || parentNodeOperator === SyntaxKind.QuestionQuestionToken) { + if (isVariableDeclaration(parentNode.parent) && parentNode.parent.initializer === parentNode) { + name = parentNode.parent.name; + decl = parentNode.parent; + } + else if (isBinaryExpression(parentNode.parent) && parentNode.parent.operatorToken.kind === SyntaxKind.EqualsToken && (allowDeclaration || parentNode.parent.right === parentNode)) { + name = parentNode.parent.left; + decl = name; + } + + if (!name || !isBindableStaticNameExpression(name) || !isSameEntityName(name, parentNode.left)) { + return undefined; + } + } + } + else if (allowDeclaration && isFunctionDeclaration(node)) { + name = node.name; + decl = node; + } + + if (!decl || !name || (!allowDeclaration && !getExpandoInitializer(node, isPrototypeAccess(name)))) { + return undefined; + } + return getSymbolOfNode(decl); + } + + function getAssignedJSPrototype(node: Node) { if (!node.parent) { return false; @@ -27478,23 +28191,45 @@ namespace ts { } if (isInJSFile(node)) { - const decl = getDeclarationOfExpando(node); - if (decl) { - const jsSymbol = getSymbolOfNode(decl); - if (jsSymbol?.exports?.size) { - const jsAssignmentType = createAnonymousType(jsSymbol, jsSymbol.exports, emptyArray, emptyArray, undefined, undefined); - jsAssignmentType.objectFlags |= ObjectFlags.JSLiteral; - return getIntersectionType([returnType, jsAssignmentType]); - } + const jsSymbol = getSymbolOfExpando(node, /*allowDeclaration*/ false); + if (jsSymbol?.exports?.size) { + const jsAssignmentType = createAnonymousType(jsSymbol, jsSymbol.exports, emptyArray, emptyArray, undefined, undefined); + jsAssignmentType.objectFlags |= ObjectFlags.JSLiteral; + return getIntersectionType([returnType, jsAssignmentType]); } } return returnType; } - function checkDeprecatedSignature(signature: Signature, node: Node) { + function checkDeprecatedSignature(signature: Signature, node: CallLikeExpression) { if (signature.declaration && signature.declaration.flags & NodeFlags.Deprecated) { - errorOrSuggestion(/*isError*/ false, node, Diagnostics._0_is_deprecated, signatureToString(signature)); + const suggestionNode = getDeprecatedSuggestionNode(node); + errorOrSuggestion(/*isError*/ false, suggestionNode, Diagnostics._0_is_deprecated, signatureToString(signature)); + } + } + + function getDeprecatedSuggestionNode(node: Node): Node { + node = skipParentheses(node); + switch (node.kind) { + case SyntaxKind.CallExpression: + case SyntaxKind.Decorator: + case SyntaxKind.NewExpression: + return getDeprecatedSuggestionNode((node).expression); + case SyntaxKind.TaggedTemplateExpression: + return getDeprecatedSuggestionNode((node).tag); + case SyntaxKind.JsxOpeningElement: + case SyntaxKind.JsxSelfClosingElement: + return getDeprecatedSuggestionNode((node).tagName); + case SyntaxKind.ElementAccessExpression: + return (node).argumentExpression; + case SyntaxKind.PropertyAccessExpression: + return (node).name; + case SyntaxKind.TypeReference: + const typeReference = node; + return isQualifiedName(typeReference.typeName) ? typeReference.typeName.right : typeReference; + default: + return node; } } @@ -27625,6 +28360,7 @@ namespace ts { case SyntaxKind.FalseKeyword: case SyntaxKind.ArrayLiteralExpression: case SyntaxKind.ObjectLiteralExpression: + case SyntaxKind.TemplateExpression: return true; case SyntaxKind.ParenthesizedExpression: return isValidConstAssertionArgument((node).expression); @@ -27830,21 +28566,40 @@ namespace ts { return length; } - function getMinArgumentCount(signature: Signature, strongArityForUntypedJS?: boolean) { - if (signatureHasRestParameter(signature)) { - const restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); - if (isTupleType(restType)) { - const firstOptionalIndex = findIndex(restType.target.elementFlags, f => !(f & ElementFlags.Required)); - const requiredCount = firstOptionalIndex < 0 ? restType.target.fixedLength : firstOptionalIndex; - if (requiredCount > 0) { - return signature.parameters.length - 1 + requiredCount; + function getMinArgumentCount(signature: Signature, flags?: MinArgumentCountFlags) { + const strongArityForUntypedJS = flags! & MinArgumentCountFlags.StrongArityForUntypedJS; + const voidIsNonOptional = flags! & MinArgumentCountFlags.VoidIsNonOptional; + if (voidIsNonOptional || signature.resolvedMinArgumentCount === undefined) { + let minArgumentCount: number | undefined; + if (signatureHasRestParameter(signature)) { + const restType = getTypeOfSymbol(signature.parameters[signature.parameters.length - 1]); + if (isTupleType(restType)) { + const firstOptionalIndex = findIndex(restType.target.elementFlags, f => !(f & ElementFlags.Required)); + const requiredCount = firstOptionalIndex < 0 ? restType.target.fixedLength : firstOptionalIndex; + if (requiredCount > 0) { + minArgumentCount = signature.parameters.length - 1 + requiredCount; + } } } + if (minArgumentCount === undefined) { + if (!strongArityForUntypedJS && signature.flags & SignatureFlags.IsUntypedSignatureInJSFile) { + return 0; + } + minArgumentCount = signature.minArgumentCount; + } + if (voidIsNonOptional) { + return minArgumentCount; + } + for (let i = minArgumentCount - 1; i >= 0; i--) { + const type = getTypeAtPosition(signature, i); + if (filterType(type, acceptsVoid).flags & TypeFlags.Never) { + break; + } + minArgumentCount = i; + } + signature.resolvedMinArgumentCount = minArgumentCount; } - if (!strongArityForUntypedJS && signature.flags & SignatureFlags.IsUntypedSignatureInJSFile) { - return 0; - } - return signature.minArgumentCount; + return signature.resolvedMinArgumentCount; } function hasEffectiveRestParameter(signature: Signature) { @@ -28231,6 +28986,10 @@ namespace ts { // notEqualFacts states that the type of the switched value is not equal to every type in the switch. const notEqualFacts = getFactsFromTypeofSwitch(0, 0, witnesses, /*hasDefault*/ true); const type = getBaseConstraintOfType(operandType) || operandType; + // Take any/unknown as a special condition. Or maybe we could change `type` to a union containing all primitive types. + if (type.flags & TypeFlags.AnyOrUnknown) { + return (TypeFacts.AllTypeofNE & notEqualFacts) === TypeFacts.AllTypeofNE; + } return !!(filterType(type, t => (getTypeFacts(t) & notEqualFacts) === notEqualFacts).flags & TypeFlags.Never); } const type = getTypeOfExpression(node.expression); @@ -28850,7 +29609,7 @@ namespace ts { // and the right operand to be of type Any, an object type, or a type parameter type. // The result is always of the Boolean primitive type. if (!(allTypesAssignableToKind(leftType, TypeFlags.StringLike | TypeFlags.NumberLike | TypeFlags.ESSymbolLike) || - isTypeAssignableToKind(leftType, TypeFlags.Index | TypeFlags.TypeParameter))) { + isTypeAssignableToKind(leftType, TypeFlags.Index | TypeFlags.TemplateLiteral | TypeFlags.StringMapping | TypeFlags.TypeParameter))) { error(left, Diagnostics.The_left_hand_side_of_an_in_expression_must_be_of_type_any_string_number_or_symbol); } if (!allTypesAssignableToKind(rightType, TypeFlags.NonPrimitive | TypeFlags.InstantiableNonPrimitive)) { @@ -28885,7 +29644,7 @@ namespace ts { checkPropertyAccessibility(property, /*isSuper*/ false, objectLiteralType, prop); } } - const elementType = getIndexedAccessType(objectLiteralType, exprType, name); + const elementType = getIndexedAccessType(objectLiteralType, exprType, name, /*aliasSymbol*/ undefined, /*aliasTypeArguments*/ undefined, AccessFlags.ExpressionPosition); const type = getFlowTypeOfDestructuring(property, elementType); return checkDestructuringAssignment(property.kind === SyntaxKind.ShorthandPropertyAssignment ? property : property.initializer, type); } @@ -28923,9 +29682,14 @@ namespace ts { // This elementType will be used if the specific property corresponding to this index is not // present (aka the tuple element property). This call also checks that the parentType is in // fact an iterable or array (depending on target language). - const elementType = checkIteratedTypeOrElementType(IterationUse.Destructuring, sourceType, undefinedType, node) || errorType; + const possiblyOutOfBoundsType = checkIteratedTypeOrElementType(IterationUse.Destructuring | IterationUse.PossiblyOutOfBounds, sourceType, undefinedType, node) || errorType; + let inBoundsType: Type | undefined = compilerOptions.noUncheckedIndexedAccess ? undefined: possiblyOutOfBoundsType; for (let i = 0; i < elements.length; i++) { - checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, elementType, checkMode); + let type = possiblyOutOfBoundsType; + if (node.elements[i].kind === SyntaxKind.SpreadElement) { + type = inBoundsType = inBoundsType ?? (checkIteratedTypeOrElementType(IterationUse.Destructuring, sourceType, undefinedType, node) || errorType); + } + checkArrayLiteralDestructuringElementAssignment(node, sourceType, i, type, checkMode); } return sourceType; } @@ -28940,7 +29704,7 @@ namespace ts { if (isArrayLikeType(sourceType)) { // We create a synthetic expression so that getIndexedAccessType doesn't get confused // when the element is a SyntaxKind.ElementAccessExpression. - const accessFlags = hasDefaultValue(element) ? AccessFlags.NoTupleBoundsCheck : 0; + const accessFlags = AccessFlags.ExpressionPosition | (hasDefaultValue(element) ? AccessFlags.NoTupleBoundsCheck : 0); const elementType = getIndexedAccessTypeOrUndefined(sourceType, indexType, createSyntheticExpression(element, indexType), accessFlags) || errorType; const assignedType = hasDefaultValue(element) ? getTypeWithFacts(elementType, TypeFacts.NEUndefined) : elementType; const type = getFlowTypeOfDestructuring(element, assignedType); @@ -29669,18 +30433,17 @@ namespace ts { } function checkTemplateExpression(node: TemplateExpression): Type { - // We just want to check each expressions, but we are unconcerned with - // the type of each expression, as any value may be coerced into a string. - // It is worth asking whether this is what we really want though. - // A place where we actually *are* concerned with the expressions' types are - // in tagged templates. - forEach(node.templateSpans, templateSpan => { - if (maybeTypeOfKind(checkExpression(templateSpan.expression), TypeFlags.ESSymbolLike)) { - error(templateSpan.expression, Diagnostics.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String); + const texts = [node.head.text]; + const types = []; + for (const span of node.templateSpans) { + const type = checkExpression(span.expression); + if (maybeTypeOfKind(type, TypeFlags.ESSymbolLike)) { + error(span.expression, Diagnostics.Implicit_conversion_of_a_symbol_to_a_string_will_fail_at_runtime_Consider_wrapping_this_expression_in_String); } - }); - - return stringType; + texts.push(span.literal.text); + types.push(isTypeAssignableTo(type, templateConstraintType) ? type : stringType); + } + return isConstContext(node) ? getTemplateLiteralType(texts, types) : stringType; } function getContextNode(node: Expression): Node { @@ -29799,7 +30562,7 @@ namespace ts { } // If the contextual type is a literal of a particular primitive type, we consider this a // literal context for all literals of that primitive type. - return !!(contextualType.flags & (TypeFlags.StringLiteral | TypeFlags.Index) && maybeTypeOfKind(candidateType, TypeFlags.StringLiteral) || + return !!(contextualType.flags & (TypeFlags.StringLiteral | TypeFlags.Index | TypeFlags.TemplateLiteral | TypeFlags.StringMapping) && maybeTypeOfKind(candidateType, TypeFlags.StringLiteral) || contextualType.flags & TypeFlags.NumberLiteral && maybeTypeOfKind(candidateType, TypeFlags.NumberLiteral) || contextualType.flags & TypeFlags.BigIntLiteral && maybeTypeOfKind(candidateType, TypeFlags.BigIntLiteral) || contextualType.flags & TypeFlags.BooleanLiteral && maybeTypeOfKind(candidateType, TypeFlags.BooleanLiteral) || @@ -29812,7 +30575,7 @@ namespace ts { const parent = node.parent; return isAssertionExpression(parent) && isConstTypeReference(parent.type) || (isParenthesizedExpression(parent) || isArrayLiteralExpression(parent) || isSpreadElement(parent)) && isConstContext(parent) || - (isPropertyAssignment(parent) || isShorthandPropertyAssignment(parent)) && isConstContext(parent.parent); + (isPropertyAssignment(parent) || isShorthandPropertyAssignment(parent) || isTemplateSpan(parent)) && isConstContext(parent.parent); } function checkExpressionForMutableLocation(node: Expression, checkMode: CheckMode | undefined, contextualType?: Type, forceTuple?: boolean): Type { @@ -30070,6 +30833,7 @@ namespace ts { } function checkExpression(node: Expression | QualifiedName, checkMode?: CheckMode, forceTuple?: boolean): Type { + tracing.begin(tracing.Phase.Check, "checkExpression", { kind: node.kind, pos: node.pos, end: node.end }); const saveCurrentNode = currentNode; currentNode = node; instantiationCount = 0; @@ -30079,6 +30843,7 @@ namespace ts { checkConstEnumAccess(node, type); } currentNode = saveCurrentNode; + tracing.end(); return type; } @@ -30884,9 +31649,8 @@ namespace ts { } const symbol = getNodeLinks(node).resolvedSymbol; if (symbol) { - if (every(symbol.declarations, d => !isTypeDeclaration(d) || !!(d.flags & NodeFlags.Deprecated))) { - const diagLocation = isTypeReferenceNode(node) && isQualifiedName(node.typeName) ? node.typeName.right : node; - errorOrSuggestion(/* isError */ false, diagLocation, Diagnostics._0_is_deprecated, symbol.escapedName as string); + if (some(symbol.declarations, d => isTypeDeclaration(d) && !!(d.flags & NodeFlags.Deprecated))) { + errorOrSuggestion(/* isError */ false, getDeprecatedSuggestionNode(node), Diagnostics._0_is_deprecated, symbol.escapedName as string); } if (type.flags & TypeFlags.Enum && symbol.flags & SymbolFlags.EnumMember) { error(node, Diagnostics.Enum_type_0_has_members_with_initializers_that_are_not_literals, typeToString(type)); @@ -30924,28 +31688,27 @@ namespace ts { function checkTupleType(node: TupleTypeNode) { const elementTypes = node.elements; let seenOptionalElement = false; - let seenNamedElement = false; + let seenRestElement = false; + const hasNamedElement = some(elementTypes, isNamedTupleMember); for (let i = 0; i < elementTypes.length; i++) { const e = elementTypes[i]; - if (e.kind === SyntaxKind.NamedTupleMember) { - seenNamedElement = true; - } - else if (seenNamedElement) { + if (e.kind !== SyntaxKind.NamedTupleMember && hasNamedElement) { grammarErrorOnNode(e, Diagnostics.Tuple_members_must_all_have_names_or_all_not_have_names); break; } const flags = getTupleElementFlags(e); if (flags & ElementFlags.Variadic) { - if (!isArrayLikeType(getTypeFromTypeNode((e).type))) { + const type = getTypeFromTypeNode((e).type); + if (!isArrayLikeType(type)) { error(e, Diagnostics.A_rest_element_type_must_be_an_array_type); break; } + if (isArrayType(type) || isTupleType(type) && type.target.combinedFlags & ElementFlags.Rest) { + seenRestElement = true; + } } else if (flags & ElementFlags.Rest) { - if (i !== elementTypes.length - 1) { - grammarErrorOnNode(e, Diagnostics.A_rest_element_must_be_last_in_a_tuple_type); - break; - } + seenRestElement = true; } else if (flags & ElementFlags.Optional) { seenOptionalElement = true; @@ -30954,12 +31717,18 @@ namespace ts { grammarErrorOnNode(e, Diagnostics.A_required_element_cannot_follow_an_optional_element); break; } + if (seenRestElement && i !== elementTypes.length - 1) { + grammarErrorOnNode(e, Diagnostics.A_rest_element_must_be_last_in_a_tuple_type); + break; + } } forEach(node.elements, checkSourceElement); + getTypeFromTypeNode(node); } function checkUnionOrIntersectionType(node: UnionOrIntersectionTypeNode) { forEach(node.types, checkSourceElement); + getTypeFromTypeNode(node); } function checkIndexedAccessIndexType(type: Type, accessNode: IndexedAccessTypeNode | ElementAccessExpression) { @@ -31004,6 +31773,7 @@ namespace ts { function checkMappedType(node: MappedTypeNode) { checkSourceElement(node.typeParameter); + checkSourceElement(node.nameType); checkSourceElement(node.type); if (!node.type) { @@ -31011,8 +31781,14 @@ namespace ts { } const type = getTypeFromMappedTypeNode(node); - const constraintType = getConstraintTypeFromMappedType(type); - checkTypeAssignableTo(constraintType, keyofConstraintType, getEffectiveConstraintOfTypeParameter(node.typeParameter)); + const nameType = getNameTypeFromMappedType(type); + if (nameType) { + checkTypeAssignableTo(nameType, keyofConstraintType, node.nameType); + } + else { + const constraintType = getConstraintTypeFromMappedType(type); + checkTypeAssignableTo(constraintType, keyofConstraintType, getEffectiveConstraintOfTypeParameter(node.typeParameter)); + } } function checkThisType(node: ThisTypeNode) { @@ -31036,6 +31812,15 @@ namespace ts { registerForUnusedIdentifiersCheck(node); } + function checkTemplateLiteralType(node: TemplateLiteralTypeNode) { + for (const span of node.templateSpans) { + checkSourceElement(span.type); + const type = getTypeFromTypeNode(span.type); + checkTypeAssignableTo(type, templateConstraintType, span.type); + } + getTypeFromTypeNode(node); + } + function checkImportType(node: ImportTypeNode) { checkSourceElement(node.argument); getTypeFromTypeNode(node); @@ -31211,6 +31996,7 @@ namespace ts { let duplicateFunctionDeclaration = false; let multipleConstructorImplementation = false; let hasNonAmbientClass = false; + const functionDeclarations = [] as Declaration[]; for (const current of declarations) { const node = current; const inAmbientContext = node.flags & NodeFlags.Ambient; @@ -31231,13 +32017,15 @@ namespace ts { } if (node.kind === SyntaxKind.FunctionDeclaration || node.kind === SyntaxKind.MethodDeclaration || node.kind === SyntaxKind.MethodSignature || node.kind === SyntaxKind.Constructor) { + functionDeclarations.push(node); const currentNodeFlags = getEffectiveDeclarationFlags(node, flagsToCheck); someNodeFlags |= currentNodeFlags; allNodeFlags &= currentNodeFlags; someHaveQuestionToken = someHaveQuestionToken || hasQuestionToken(node); allHaveQuestionToken = allHaveQuestionToken && hasQuestionToken(node); + const bodyIsPresent = nodeIsPresent((node as FunctionLikeDeclaration).body); - if (nodeIsPresent((node as FunctionLikeDeclaration).body) && bodyDeclaration) { + if (bodyIsPresent && bodyDeclaration) { if (isConstructor) { multipleConstructorImplementation = true; } @@ -31245,11 +32033,11 @@ namespace ts { duplicateFunctionDeclaration = true; } } - else if (previousDeclaration && previousDeclaration.parent === node.parent && previousDeclaration.end !== node.pos) { + else if (previousDeclaration?.parent === node.parent && previousDeclaration.end !== node.pos) { reportImplementationExpectedError(previousDeclaration); } - if (nodeIsPresent((node as FunctionLikeDeclaration).body)) { + if (bodyIsPresent) { if (!bodyDeclaration) { bodyDeclaration = node as FunctionLikeDeclaration; } @@ -31267,14 +32055,14 @@ namespace ts { } if (multipleConstructorImplementation) { - forEach(declarations, declaration => { + forEach(functionDeclarations, declaration => { error(declaration, Diagnostics.Multiple_constructor_implementations_are_not_allowed); }); } if (duplicateFunctionDeclaration) { - forEach(declarations, declaration => { - error(getNameOfDeclaration(declaration), Diagnostics.Duplicate_function_implementation); + forEach(functionDeclarations, declaration => { + error(getNameOfDeclaration(declaration) || declaration, Diagnostics.Duplicate_function_implementation); }); } @@ -32110,11 +32898,8 @@ namespace ts { } if (symbol.parent) { - // run check once for the first declaration - if (getDeclarationOfKind(symbol, node.kind) === node) { - // run check on export symbol to check that modifiers agree across all exported declarations - checkFunctionOrConstructorSymbol(symbol); - } + // run check on export symbol to check that modifiers agree across all exported declarations + checkFunctionOrConstructorSymbol(symbol); } } @@ -32717,7 +33502,7 @@ namespace ts { forEach(node.name.elements, checkSourceElement); } // For a parameter declaration with an initializer, error and exit if the containing function doesn't have a body - if (node.initializer && getRootDeclaration(node).kind === SyntaxKind.Parameter && nodeIsMissing((getContainingFunction(node) as FunctionLikeDeclaration).body)) { + if (node.initializer && isParameterDeclaration(node) && nodeIsMissing((getContainingFunction(node) as FunctionLikeDeclaration).body)) { error(node, Diagnostics.A_parameter_initializer_is_only_allowed_in_a_function_or_constructor_implementation); return; } @@ -32749,7 +33534,13 @@ namespace ts { } return; } + // For a commonjs `const x = require`, validate the alias and exit const symbol = getSymbolOfNode(node); + if (symbol.flags & SymbolFlags.Alias && isRequireVariableDeclaration(node, /*requireStringLiteralLikeArgument*/ true)) { + checkAliasSymbol(node); + return; + } + const type = convertAutoToAny(getTypeOfSymbol(symbol)); if (node === symbol.valueDeclaration) { // Node is the primary declaration of the symbol, just validate the initializer @@ -32843,8 +33634,10 @@ namespace ts { } function checkVariableDeclaration(node: VariableDeclaration) { + tracing.begin(tracing.Phase.Check, "checkVariableDeclaration", { kind: node.kind, pos: node.pos, end: node.end }); checkGrammarVariableDeclaration(node); - return checkVariableLikeDeclaration(node); + checkVariableLikeDeclaration(node); + tracing.end(); } function checkBindingElement(node: BindingElement) { @@ -33150,6 +33943,7 @@ namespace ts { const uplevelIteration = languageVersion >= ScriptTarget.ES2015; const downlevelIteration = !uplevelIteration && compilerOptions.downlevelIteration; + const possibleOutOfBounds = compilerOptions.noUncheckedIndexedAccess && !!(use & IterationUse.PossiblyOutOfBounds); // Get the iterated type of an `Iterable` or `IterableIterator` only in ES2015 // or higher, when inside of an async generator or for-await-if, or when @@ -33171,7 +33965,7 @@ namespace ts { } } if (iterationTypes || uplevelIteration) { - return iterationTypes && iterationTypes.yieldType; + return possibleOutOfBounds ? includeUndefinedInIndexSignature(iterationTypes && iterationTypes.yieldType) : (iterationTypes && iterationTypes.yieldType); } } @@ -33208,7 +34002,7 @@ namespace ts { // Now that we've removed all the StringLike types, if no constituents remain, then the entire // arrayOrStringType was a string. if (arrayType.flags & TypeFlags.Never) { - return stringType; + return possibleOutOfBounds ? includeUndefinedInIndexSignature(stringType) : stringType; } } } @@ -33238,20 +34032,20 @@ namespace ts { defaultDiagnostic, typeToString(arrayType)); } - return hasStringConstituent ? stringType : undefined; + return hasStringConstituent ? possibleOutOfBounds ? includeUndefinedInIndexSignature(stringType) : stringType : undefined; } const arrayElementType = getIndexTypeOfType(arrayType, IndexKind.Number); if (hasStringConstituent && arrayElementType) { // This is just an optimization for the case where arrayOrStringType is string | string[] - if (arrayElementType.flags & TypeFlags.StringLike) { + if (arrayElementType.flags & TypeFlags.StringLike && !compilerOptions.noUncheckedIndexedAccess) { return stringType; } - return getUnionType([arrayElementType, stringType], UnionReduction.Subtype); + return getUnionType(possibleOutOfBounds ? [arrayElementType, stringType, undefinedType] : [arrayElementType, stringType], UnionReduction.Subtype); } - return arrayElementType; + return (use & IterationUse.PossiblyOutOfBounds) ? includeUndefinedInIndexSignature(arrayElementType) : arrayElementType; } /** @@ -33375,8 +34169,9 @@ namespace ts { if (iterationTypes === noIterationTypes) { if (errorNode) { reportTypeNotIterableError(errorNode, type, !!(use & IterationUse.AllowsAsyncIterablesFlag)); - errorNode = undefined; } + setCachedIterationTypes(type, cacheKey, noIterationTypes); + return undefined; } else { allIterationTypes = append(allIterationTypes, iterationTypes); @@ -33541,7 +34336,7 @@ namespace ts { return setCachedIterationTypes(type, resolver.iterableCacheKey, noIterationTypes); } - const iteratorType = getUnionType(map(signatures, getReturnTypeOfSignature), UnionReduction.Subtype); + const iteratorType = getIntersectionType(map(signatures, getReturnTypeOfSignature)); const iterationTypes = getIterationTypesOfIterator(iteratorType, resolver, errorNode) ?? noIterationTypes; return setCachedIterationTypes(type, resolver.iterableCacheKey, iterationTypes); } @@ -33718,6 +34513,28 @@ namespace ts { return methodName === "next" ? anyIterationTypes : undefined; } + // If the method signature comes exclusively from the global iterator or generator type, + // create iteration types from its type arguments like `getIterationTypesOfIteratorFast` + // does (so as to remove `undefined` from the next and return types). We arrive here when + // a contextual type for a generator was not a direct reference to one of those global types, + // but looking up `methodType` referred to one of them (and nothing else). E.g., in + // `interface SpecialIterator extends Iterator {}`, `SpecialIterator` is not a + // reference to `Iterator`, but its `next` member derives exclusively from `Iterator`. + if (methodType?.symbol && methodSignatures.length === 1) { + const globalGeneratorType = resolver.getGlobalGeneratorType(/*reportErrors*/ false); + const globalIteratorType = resolver.getGlobalIteratorType(/*reportErrors*/ false); + const isGeneratorMethod = globalGeneratorType.symbol?.members?.get(methodName as __String) === methodType.symbol; + const isIteratorMethod = !isGeneratorMethod && globalIteratorType.symbol?.members?.get(methodName as __String) === methodType.symbol; + if (isGeneratorMethod || isIteratorMethod) { + const globalType = isGeneratorMethod ? globalGeneratorType : globalIteratorType; + const { mapper } = methodType as AnonymousType; + return createIterationTypes( + getMappedType(globalType.typeParameters![0], mapper!), + getMappedType(globalType.typeParameters![1], mapper!), + methodName === "next" ? getMappedType(globalType.typeParameters![2], mapper!) : undefined); + } + } + // Extract the first parameter and return type of each signature. let methodParameterTypes: Type[] | undefined; let methodReturnTypes: Type[] | undefined; @@ -33747,7 +34564,7 @@ namespace ts { // Resolve the *yield* and *return* types from the return type of the method (i.e. `IteratorResult`) let yieldType: Type; - const methodReturnType = methodReturnTypes ? getUnionType(methodReturnTypes, UnionReduction.Subtype) : neverType; + const methodReturnType = methodReturnTypes ? getIntersectionType(methodReturnTypes) : neverType; const resolvedMethodReturnType = resolver.resolveIterationType(methodReturnType, errorNode) || anyType; const iterationTypes = getIterationTypesOfIteratorResult(resolvedMethodReturnType); if (iterationTypes === noIterationTypes) { @@ -33981,12 +34798,15 @@ namespace ts { if (catchClause) { // Grammar checking if (catchClause.variableDeclaration) { - if (catchClause.variableDeclaration.type && getTypeOfNode(catchClause.variableDeclaration) === errorType) { - grammarErrorOnFirstToken(catchClause.variableDeclaration.type, - Diagnostics.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified); + const declaration = catchClause.variableDeclaration; + if (declaration.type) { + const type = getTypeForVariableLikeDeclaration(declaration, /*includeOptionality*/ false); + if (type && !(type.flags & TypeFlags.AnyOrUnknown)) { + grammarErrorOnFirstToken(declaration.type, Diagnostics.Catch_clause_variable_type_annotation_must_be_any_or_unknown_if_specified); + } } - else if (catchClause.variableDeclaration.initializer) { - grammarErrorOnFirstToken(catchClause.variableDeclaration.initializer, Diagnostics.Catch_clause_variable_cannot_have_an_initializer); + else if (declaration.initializer) { + grammarErrorOnFirstToken(declaration.initializer, Diagnostics.Catch_clause_variable_cannot_have_an_initializer); } else { const blockLocals = catchClause.block.locals; @@ -34292,6 +35112,7 @@ namespace ts { const typeWithThis = getTypeWithThisArgument(type); const staticType = getTypeOfSymbol(symbol); checkTypeParameterListsIdentical(symbol); + checkFunctionOrConstructorSymbol(symbol); checkClassForDuplicateDeclarations(node); // Only check for reserved static identifiers on non-ambient context. @@ -34720,12 +35541,18 @@ namespace ts { function checkTypeAliasDeclaration(node: TypeAliasDeclaration) { // Grammar checking checkGrammarDecoratorsAndModifiers(node); - checkTypeNameIsReserved(node.name, Diagnostics.Type_alias_name_cannot_be_0); checkExportsOnMergedDeclarations(node); checkTypeParameters(node.typeParameters); - checkSourceElement(node.type); - registerForUnusedIdentifiersCheck(node); + if (node.type.kind === SyntaxKind.IntrinsicKeyword) { + if (!intrinsicTypeKinds.has(node.name.escapedText as string) || length(node.typeParameters) !== 1) { + error(node.type, Diagnostics.The_intrinsic_keyword_can_only_be_used_to_declare_compiler_provided_intrinsic_types); + } + } + else { + checkSourceElement(node.type); + registerForUnusedIdentifiersCheck(node); + } } function computeEnumMemberValues(node: EnumDeclaration) { @@ -35195,7 +36022,7 @@ namespace ts { return true; } - function checkAliasSymbol(node: ImportEqualsDeclaration | ImportClause | NamespaceImport | ImportSpecifier | ExportSpecifier | NamespaceExport) { + function checkAliasSymbol(node: ImportEqualsDeclaration | VariableDeclaration | ImportClause | NamespaceImport | ImportSpecifier | ExportSpecifier | NamespaceExport) { let symbol = getSymbolOfNode(node); const target = resolveAlias(symbol); @@ -35227,9 +36054,7 @@ namespace ts { error(node, Diagnostics.Re_exporting_a_type_when_the_isolatedModules_flag_is_provided_requires_using_export_type); } - if (isImportSpecifier(node) && - (target.valueDeclaration && target.valueDeclaration.flags & NodeFlags.Deprecated - || every(target.declarations, d => !!(d.flags & NodeFlags.Deprecated)))) { + if (isImportSpecifier(node) && every(target.declarations, d => !!(getCombinedNodeFlags(d) & NodeFlags.Deprecated))) { errorOrSuggestion(/* isError */ false, node.name, Diagnostics._0_is_deprecated, symbol.escapedName as string); } } @@ -35482,6 +36307,9 @@ namespace ts { checkExpressionCached(node.expression); } } + else { + checkExpressionCached(node.expression); // doesn't resolve, check as expression to mark as error + } if (getEmitDeclarations(compilerOptions)) { collectLinkedAliases(node.expression as Identifier, /*setVisibility*/ true); @@ -35636,6 +36464,8 @@ namespace ts { return checkConditionalType(node); case SyntaxKind.InferType: return checkInferType(node); + case SyntaxKind.TemplateLiteralType: + return checkTemplateLiteralType(node); case SyntaxKind.ImportType: return checkImportType(node); case SyntaxKind.NamedTupleMember: @@ -35878,10 +36708,12 @@ namespace ts { } function checkSourceFile(node: SourceFile) { + tracing.begin(tracing.Phase.Check, "checkSourceFile", { path: node.path }); performance.mark("beforeCheck"); checkSourceFileWorker(node); performance.mark("afterCheck"); performance.measure("Check", "beforeCheck", "afterCheck"); + tracing.end(); } function unusedIsError(kind: UnusedKind, isAmbient: boolean): boolean { @@ -36164,6 +36996,17 @@ namespace ts { return node.parent.kind === SyntaxKind.ExpressionWithTypeArguments; } + function isJSDocEntryNameReference(node: Identifier | PrivateIdentifier | PropertyAccessExpression | QualifiedName): boolean { + while (node.parent.kind === SyntaxKind.QualifiedName) { + node = node.parent as QualifiedName; + } + while (node.parent.kind === SyntaxKind.PropertyAccessExpression) { + node = node.parent as PropertyAccessExpression; + } + + return node.parent.kind === SyntaxKind.JSDocNameReference; + } + function forEachEnclosingClass(node: Node, callback: (node: Node) => T | undefined): T | undefined { let result: T | undefined; @@ -36348,6 +37191,10 @@ namespace ts { const meaning = name.parent.kind === SyntaxKind.TypeReference ? SymbolFlags.Type : SymbolFlags.Namespace; return resolveEntityName(name, meaning, /*ignoreErrors*/ false, /*dontResolveAlias*/ true); } + else if (isJSDocEntryNameReference(name)) { + const meaning = SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Value; + return resolveEntityName(name, meaning, /*ignoreErrors*/ false, /*dontResolveAlias*/ true, getHostSignatureFromJSDoc(name)); + } if (name.parent.kind === SyntaxKind.TypePredicate) { return resolveEntityName(name, /*meaning*/ SymbolFlags.FunctionScopedVariable); @@ -36481,13 +37328,22 @@ namespace ts { } /** Returns the target of an export specifier without following aliases */ - function getExportSpecifierLocalTargetSymbol(node: ExportSpecifier): Symbol | undefined { - return node.parent.parent.moduleSpecifier ? - getExternalModuleMember(node.parent.parent, node) : - resolveEntityName(node.propertyName || node.name, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias); + function getExportSpecifierLocalTargetSymbol(node: ExportSpecifier | Identifier): Symbol | undefined { + if (isExportSpecifier(node)) { + return node.parent.parent.moduleSpecifier ? + getExternalModuleMember(node.parent.parent, node) : + resolveEntityName(node.propertyName || node.name, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias); + } + else { + return resolveEntityName(node, SymbolFlags.Value | SymbolFlags.Type | SymbolFlags.Namespace | SymbolFlags.Alias); + } } function getTypeOfNode(node: Node): Type { + if (isSourceFile(node) && !isExternalModule(node)) { + return errorType; + } + if (node.flags & NodeFlags.InWithStatement) { // We cannot answer semantic questions within a with block, do not proceed any further return errorType; @@ -36768,6 +37624,9 @@ namespace ts { // When resolved as an expression identifier, if the given node references an import, return the declaration of // that import. Otherwise, return undefined. function getReferencedImportDeclaration(nodeIn: Identifier): Declaration | undefined { + if (nodeIn.generatedImportReference) { + return nodeIn.generatedImportReference; + } const node = getParseTreeNode(nodeIn, isIdentifier); if (node) { const symbol = getReferencedValueSymbol(node); @@ -37445,7 +38304,7 @@ namespace ts { if (fileToDirective.has(file.path)) return; fileToDirective.set(file.path, key); for (const { fileName } of file.referencedFiles) { - const resolvedFile = resolveTripleslashReference(fileName, file.originalFileName); + const resolvedFile = resolveTripleslashReference(fileName, file.fileName); const referencedFile = host.getSourceFile(resolvedFile); if (referencedFile) { addReferencedFilesToTypeDirective(referencedFile, key); @@ -37846,6 +38705,9 @@ namespace ts { if (flags & ModifierFlags.Private) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "private", "abstract"); } + if (flags & ModifierFlags.Async && lastAsync) { + return grammarErrorOnNode(lastAsync, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract"); + } } if (isNamedDeclaration(node) && node.name.kind === SyntaxKind.PrivateIdentifier) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_a_private_identifier, "abstract"); @@ -37864,6 +38726,9 @@ namespace ts { else if (node.kind === SyntaxKind.Parameter) { return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_appear_on_a_parameter, "async"); } + if (flags & ModifierFlags.Abstract) { + return grammarErrorOnNode(modifier, Diagnostics._0_modifier_cannot_be_used_with_1_modifier, "async", "abstract"); + } flags |= ModifierFlags.Async; lastAsync = modifier; break; @@ -38765,11 +39630,13 @@ namespace ts { } if (node.exclamationToken && (node.parent.parent.kind !== SyntaxKind.VariableStatement || !node.type || node.initializer || node.flags & NodeFlags.Ambient)) { - return grammarErrorOnNode(node.exclamationToken, Diagnostics.Definite_assignment_assertions_can_only_be_used_along_with_a_type_annotation); + const message = node.initializer + ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions + : Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations; + return grammarErrorOnNode(node.exclamationToken, message); } const moduleKind = getEmitModuleKind(compilerOptions); - if (moduleKind < ModuleKind.ES2015 && moduleKind !== ModuleKind.System && !(node.parent.parent.flags & NodeFlags.Ambient) && hasSyntacticModifier(node.parent.parent, ModifierFlags.Export)) { checkESModuleMarker(node.name); @@ -38969,7 +39836,12 @@ namespace ts { if (isPropertyDeclaration(node) && node.exclamationToken && (!isClassLike(node.parent) || !node.type || node.initializer || node.flags & NodeFlags.Ambient || hasSyntacticModifier(node, ModifierFlags.Static | ModifierFlags.Abstract))) { - return grammarErrorOnNode(node.exclamationToken, Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context); + const message = node.initializer + ? Diagnostics.Declarations_with_initializers_cannot_also_have_definite_assignment_assertions + : !node.type + ? Diagnostics.Declarations_with_definite_assignment_assertions_must_also_have_type_annotations + : Diagnostics.A_definite_assignment_assertion_is_not_permitted_in_this_context; + return grammarErrorOnNode(node.exclamationToken, message); } } diff --git a/src/compiler/commandLineParser.ts b/src/compiler/commandLineParser.ts index f5cb2990a59..04834a11a29 100644 --- a/src/compiler/commandLineParser.ts +++ b/src/compiler/commandLineParser.ts @@ -2,6 +2,17 @@ namespace ts { /* @internal */ export const compileOnSaveCommandLineOption: CommandLineOption = { name: "compileOnSave", type: "boolean" }; + const jsxOptionMap = new Map(getEntries({ + "preserve": JsxEmit.Preserve, + "react-native": JsxEmit.ReactNative, + "react": JsxEmit.React, + "react-jsx": JsxEmit.ReactJSX, + "react-jsxdev": JsxEmit.ReactJSXDev, + })); + + /* @internal */ + export const inverseJsxOptionMap = new Map(arrayFrom(mapIterator(jsxOptionMap.entries(), ([key, value]: [string, JsxEmit]) => ["" + value, key] as const))); + // NOTE: The order here is important to default lib ordering as entries will have the same // order in the generated program (see `getDefaultLibPriority` in program.ts). This // order also affects overload resolution when a type declared in one lib is @@ -23,6 +34,7 @@ namespace ts { ["dom.iterable", "lib.dom.iterable.d.ts"], ["webworker", "lib.webworker.d.ts"], ["webworker.importscripts", "lib.webworker.importscripts.d.ts"], + ["webworker.iterable", "lib.webworker.iterable.d.ts"], ["scripthost", "lib.scripthost.d.ts"], // ES2015 Or ESNext By-feature options ["es2015.core", "lib.es2015.core.d.ts"], @@ -51,6 +63,7 @@ namespace ts { ["es2019.symbol", "lib.es2019.symbol.d.ts"], ["es2020.bigint", "lib.es2020.bigint.d.ts"], ["es2020.promise", "lib.es2020.promise.d.ts"], + ["es2020.sharedmemory", "lib.es2020.sharedmemory.d.ts"], ["es2020.string", "lib.es2020.string.d.ts"], ["es2020.symbol.wellknown", "lib.es2020.symbol.wellknown.d.ts"], ["es2020.intl", "lib.es2020.intl.d.ts"], @@ -197,6 +210,15 @@ namespace ts { category: Diagnostics.Advanced_Options, description: Diagnostics.Generates_a_CPU_profile }, + { + name: "generateTrace", + type: "string", + isFilePath: true, + isCommandLineOnly: true, + paramType: Diagnostics.DIRECTORY, + category: Diagnostics.Advanced_Options, + description: Diagnostics.Generates_an_event_trace_and_a_list_of_types + }, { name: "incremental", shortName: "i", @@ -356,12 +378,9 @@ namespace ts { }, { name: "jsx", - type: new Map(getEntries({ - "preserve": JsxEmit.Preserve, - "react-native": JsxEmit.ReactNative, - "react": JsxEmit.React - })), + type: jsxOptionMap, affectsSourceFile: true, + affectsEmit: true, paramType: Diagnostics.KIND, showInSimplifiedHelpView: true, category: Diagnostics.Basic_Options, @@ -606,6 +625,14 @@ namespace ts { category: Diagnostics.Additional_Checks, description: Diagnostics.Report_errors_for_fallthrough_cases_in_switch_statement }, + { + name: "noUncheckedIndexedAccess", + type: "boolean", + affectsSemanticDiagnostics: true, + showInSimplifiedHelpView: false, + category: Diagnostics.Additional_Checks, + description: Diagnostics.Include_undefined_in_index_signature_results + }, // Module Resolution { @@ -771,6 +798,12 @@ namespace ts { category: Diagnostics.Advanced_Options, description: Diagnostics.Specify_the_JSX_fragment_factory_function_to_use_when_targeting_react_JSX_emit_with_jsxFactory_compiler_option_is_specified_e_g_Fragment }, + { + name: "jsxImportSource", + type: "string", + category: Diagnostics.Advanced_Options, + description: Diagnostics.Specify_the_module_specifier_to_be_used_to_import_the_jsx_and_jsxs_factory_functions_from_eg_react + }, { name: "resolveJsonModule", type: "boolean", @@ -882,6 +915,13 @@ namespace ts { category: Diagnostics.Advanced_Options, description: Diagnostics.Disable_solution_searching_for_this_project }, + { + name: "disableReferencedProjectLoad", + type: "boolean", + isTSConfigOnly: true, + category: Diagnostics.Advanced_Options, + description: Diagnostics.Disable_loading_referenced_projects + }, { name: "noImplicitUseStrict", type: "boolean", @@ -986,6 +1026,14 @@ namespace ts { category: Diagnostics.Advanced_Options, description: Diagnostics.Emit_class_fields_with_Define_instead_of_Set, }, + { + name: "bundledPackageName", + type: "string", + affectsEmit: true, + category: Diagnostics.Advanced_Options, + description: Diagnostics.Provides_a_root_package_name_when_using_outFile_with_declarations, + }, + { name: "keyofStringsOnly", type: "boolean", @@ -2301,53 +2349,48 @@ namespace ts { }; function getFileNames(): ExpandResult { - let filesSpecs: readonly string[] | undefined; - if (hasProperty(raw, "files") && !isNullOrUndefined(raw.files)) { - if (isArray(raw.files)) { - filesSpecs = raw.files; - const hasReferences = hasProperty(raw, "references") && !isNullOrUndefined(raw.references); - const hasZeroOrNoReferences = !hasReferences || raw.references.length === 0; - const hasExtends = hasProperty(raw, "extends"); - if (filesSpecs.length === 0 && hasZeroOrNoReferences && !hasExtends) { - if (sourceFile) { - const fileName = configFileName || "tsconfig.json"; - const diagnosticMessage = Diagnostics.The_files_list_in_config_file_0_is_empty; - const nodeValue = firstDefined(getTsConfigPropArray(sourceFile, "files"), property => property.initializer); - const error = nodeValue - ? createDiagnosticForNodeInSourceFile(sourceFile, nodeValue, diagnosticMessage, fileName) - : createCompilerDiagnostic(diagnosticMessage, fileName); - errors.push(error); - } - else { - createCompilerDiagnosticOnlyIfJson(Diagnostics.The_files_list_in_config_file_0_is_empty, configFileName || "tsconfig.json"); - } + const referencesOfRaw = getPropFromRaw("references", element => typeof element === "object", "object"); + if (isArray(referencesOfRaw)) { + for (const ref of referencesOfRaw) { + if (typeof ref.path !== "string") { + createCompilerDiagnosticOnlyIfJson(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "reference.path", "string"); + } + else { + (projectReferences || (projectReferences = [])).push({ + path: getNormalizedAbsolutePath(ref.path, basePath), + originalPath: ref.path, + prepend: ref.prepend, + circular: ref.circular + }); } } - else { - createCompilerDiagnosticOnlyIfJson(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "files", "Array"); + } + + const filesSpecs = toPropValue(getSpecsFromRaw("files")); + if (filesSpecs) { + const hasZeroOrNoReferences = referencesOfRaw === "no-prop" || isArray(referencesOfRaw) && referencesOfRaw.length === 0; + const hasExtends = hasProperty(raw, "extends"); + if (filesSpecs.length === 0 && hasZeroOrNoReferences && !hasExtends) { + if (sourceFile) { + const fileName = configFileName || "tsconfig.json"; + const diagnosticMessage = Diagnostics.The_files_list_in_config_file_0_is_empty; + const nodeValue = firstDefined(getTsConfigPropArray(sourceFile, "files"), property => property.initializer); + const error = nodeValue + ? createDiagnosticForNodeInSourceFile(sourceFile, nodeValue, diagnosticMessage, fileName) + : createCompilerDiagnostic(diagnosticMessage, fileName); + errors.push(error); + } + else { + createCompilerDiagnosticOnlyIfJson(Diagnostics.The_files_list_in_config_file_0_is_empty, configFileName || "tsconfig.json"); + } } } - let includeSpecs: readonly string[] | undefined; - if (hasProperty(raw, "include") && !isNullOrUndefined(raw.include)) { - if (isArray(raw.include)) { - includeSpecs = raw.include; - } - else { - createCompilerDiagnosticOnlyIfJson(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "include", "Array"); - } - } + let includeSpecs = toPropValue(getSpecsFromRaw("include")); - let excludeSpecs: readonly string[] | undefined; - if (hasProperty(raw, "exclude") && !isNullOrUndefined(raw.exclude)) { - if (isArray(raw.exclude)) { - excludeSpecs = raw.exclude; - } - else { - createCompilerDiagnosticOnlyIfJson(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "exclude", "Array"); - } - } - else if (raw.compilerOptions) { + const excludeOfRaw = getSpecsFromRaw("exclude"); + let excludeSpecs = toPropValue(excludeOfRaw); + if (excludeOfRaw === "no-prop" && raw.compilerOptions) { const outDir = raw.compilerOptions.outDir; const declarationDir = raw.compilerOptions.declarationDir; @@ -2365,28 +2408,33 @@ namespace ts { errors.push(getErrorForNoInputFiles(result.spec, configFileName)); } - if (hasProperty(raw, "references") && !isNullOrUndefined(raw.references)) { - if (isArray(raw.references)) { - for (const ref of raw.references) { - if (typeof ref.path !== "string") { - createCompilerDiagnosticOnlyIfJson(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "reference.path", "string"); - } - else { - (projectReferences || (projectReferences = [])).push({ - path: getNormalizedAbsolutePath(ref.path, basePath), - originalPath: ref.path, - prepend: ref.prepend, - circular: ref.circular - }); - } + return result; + } + + type PropOfRaw = readonly T[] | "not-array" | "no-prop"; + function toPropValue(specResult: PropOfRaw) { + return isArray(specResult) ? specResult : undefined; + } + + function getSpecsFromRaw(prop: "files" | "include" | "exclude"): PropOfRaw { + return getPropFromRaw(prop, isString, "string"); + } + + function getPropFromRaw(prop: "files" | "include" | "exclude" | "references", validateElement: (value: unknown) => boolean, elementTypeName: string): PropOfRaw { + if (hasProperty(raw, prop) && !isNullOrUndefined(raw[prop])) { + if (isArray(raw[prop])) { + const result = raw[prop]; + if (!sourceFile && !every(result, validateElement)) { + errors.push(createCompilerDiagnostic(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, prop, elementTypeName)); } + return result; } else { - createCompilerDiagnosticOnlyIfJson(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, "references", "Array"); + createCompilerDiagnosticOnlyIfJson(Diagnostics.Compiler_option_0_requires_a_value_of_type_1, prop, "Array"); + return "not-array"; } } - - return result; + return "no-prop"; } function createCompilerDiagnosticOnlyIfJson(message: DiagnosticMessage, arg0?: string, arg1?: string) { @@ -2470,6 +2518,13 @@ namespace ts { parseOwnConfigOfJson(json, host, basePath, configFileName, errors) : parseOwnConfigOfJsonSourceFile(sourceFile!, host, basePath, configFileName, errors); + if (ownConfig.options?.paths) { + // If we end up needing to resolve relative paths from 'paths' relative to + // the config file location, we'll need to know where that config file was. + // Since 'paths' can be inherited from an extended config in another directory, + // we wouldn't know which directory to use unless we store it here. + ownConfig.options.pathsBasePath = basePath; + } if (ownConfig.extendedConfigPath) { // copy the resolution stack so it is never reused between branches in potential diamond-problem scenarios. resolutionStack = resolutionStack.concat([resolvedPath]); @@ -2934,7 +2989,15 @@ namespace ts { // new entries in these paths. const wildcardDirectories = getWildcardDirectories(validatedIncludeSpecs, validatedExcludeSpecs, basePath, host.useCaseSensitiveFileNames); - const spec: ConfigFileSpecs = { filesSpecs, includeSpecs, excludeSpecs, validatedIncludeSpecs, validatedExcludeSpecs, wildcardDirectories }; + const spec: ConfigFileSpecs = { + filesSpecs, + includeSpecs, + excludeSpecs, + validatedFilesSpec: filter(filesSpecs, isString), + validatedIncludeSpecs, + validatedExcludeSpecs, + wildcardDirectories + }; return getFileNamesFromConfigSpecs(spec, basePath, options, host, extraFileExtensions); } @@ -2973,7 +3036,7 @@ namespace ts { // file map with a possibly case insensitive key. We use this map to store paths matched // via wildcard of *.json kind const wildCardJsonFileMap = new Map(); - const { filesSpecs, validatedIncludeSpecs, validatedExcludeSpecs, wildcardDirectories } = spec; + const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs, wildcardDirectories } = spec; // Rather than requery this for each file and filespec, we query the supported extensions // once and store it on the expansion context. @@ -2982,8 +3045,8 @@ namespace ts { // Literal files are always included verbatim. An "include" or "exclude" specification cannot // remove a literal file. - if (filesSpecs) { - for (const fileName of filesSpecs) { + if (validatedFilesSpec) { + for (const fileName of validatedFilesSpec) { const file = getNormalizedAbsolutePath(fileName, basePath); literalFileMap.set(keyMapper(file), file); } @@ -3049,14 +3112,14 @@ namespace ts { useCaseSensitiveFileNames: boolean, currentDirectory: string ): boolean { - const { filesSpecs, validatedIncludeSpecs, validatedExcludeSpecs } = spec; + const { validatedFilesSpec, validatedIncludeSpecs, validatedExcludeSpecs } = spec; if (!length(validatedIncludeSpecs) || !length(validatedExcludeSpecs)) return false; basePath = normalizePath(basePath); const keyMapper = createGetCanonicalFileName(useCaseSensitiveFileNames); - if (filesSpecs) { - for (const fileName of filesSpecs) { + if (validatedFilesSpec) { + for (const fileName of validatedFilesSpec) { if (keyMapper(getNormalizedAbsolutePath(fileName, basePath)) === pathToCheck) return false; } } @@ -3070,6 +3133,7 @@ namespace ts { function validateSpecs(specs: readonly string[], errors: Push, allowTrailingRecursion: boolean, jsonSourceFile: TsConfigSourceFile | undefined, specKey: string): readonly string[] { return specs.filter(spec => { + if (!isString(spec)) return false; const diag = specToDiagnostic(spec, allowTrailingRecursion); if (diag !== undefined) { errors.push(createDiagnostic(diag, spec)); diff --git a/src/compiler/core.ts b/src/compiler/core.ts index 753af89b590..13a661d423f 100644 --- a/src/compiler/core.ts +++ b/src/compiler/core.ts @@ -1304,14 +1304,14 @@ namespace ts { return values; } - const _entries = Object.entries ? Object.entries : (obj: MapLike) => { + const _entries = Object.entries || ((obj: MapLike) => { const keys = getOwnKeys(obj); const result: [string, T][] = Array(keys.length); - for (const key of keys) { - result.push([key, obj[key]]); + for (let i = 0; i < keys.length; i++) { + result[i] = [keys[i], obj[keys[i]]]; } return result; - }; + }); export function getEntries(obj: MapLike): [string, T][] { return obj ? _entries(obj) : []; @@ -2250,18 +2250,36 @@ namespace ts { } } - export function padLeft(s: string, length: number) { - while (s.length < length) { - s = " " + s; - } - return s; + + /** + * Returns string left-padded with spaces or zeros until it reaches the given length. + * + * @param s String to pad. + * @param length Final padded length. If less than or equal to 's.length', returns 's' unchanged. + * @param padString Character to use as padding (default " "). + */ + export function padLeft(s: string, length: number, padString: " " | "0" = " ") { + return length <= s.length ? s : padString.repeat(length - s.length) + s; } - export function padRight(s: string, length: number) { - while (s.length < length) { - s = s + " "; - } + /** + * Returns string right-padded with spaces until it reaches the given length. + * + * @param s String to pad. + * @param length Final padded length. If less than or equal to 's.length', returns 's' unchanged. + * @param padString Character to use as padding (default " "). + */ + export function padRight(s: string, length: number, padString: " " = " ") { + return length <= s.length ? s : s + padString.repeat(length - s.length); + } - return s; + export function takeWhile(array: readonly T[], predicate: (element: T) => element is U): U[]; + export function takeWhile(array: readonly T[], predicate: (element: T) => boolean): T[] { + const len = array.length; + let index = 0; + while (index < len && predicate(array[index])) { + index++; + } + return array.slice(0, index); } } diff --git a/src/compiler/corePublic.ts b/src/compiler/corePublic.ts index dad59377900..ecf3f929fae 100644 --- a/src/compiler/corePublic.ts +++ b/src/compiler/corePublic.ts @@ -1,7 +1,7 @@ namespace ts { // WARNING: The script `configurePrerelease.ts` uses a regexp to parse out these values. // If changing the text in this section, be sure to test `configurePrerelease` too. - export const versionMajorMinor = "4.0"; + export const versionMajorMinor = "4.1"; /** The version of the TypeScript compiler release */ export const version = `${versionMajorMinor}.0-dev`; diff --git a/src/compiler/debug.ts b/src/compiler/debug.ts index 62b01e816a9..8e3ce1cfa46 100644 --- a/src/compiler/debug.ts +++ b/src/compiler/debug.ts @@ -371,6 +371,10 @@ namespace ts { return formatEnum(flags, (ts).ObjectFlags, /*isFlags*/ true); } + export function formatFlowFlags(flags: FlowFlags | undefined): string { + return formatEnum(flags, (ts).FlowFlags, /*isFlags*/ true); + } + let isDebugInfoEnabled = false; interface ExtendedDebugModule { @@ -396,13 +400,87 @@ namespace ts { return extendedDebug().formatControlFlowGraph(flowNode); } - export function attachFlowNodeDebugInfo(flowNode: FlowNode) { + let flowNodeProto: FlowNodeBase | undefined; + + function attachFlowNodeDebugInfoWorker(flowNode: FlowNodeBase) { + if (!("__debugFlowFlags" in flowNode)) { // eslint-disable-line no-in-operator + Object.defineProperties(flowNode, { + // for use with vscode-js-debug's new customDescriptionGenerator in launch.json + __tsDebuggerDisplay: { + value(this: FlowNodeBase) { + const flowHeader = + this.flags & FlowFlags.Start ? "FlowStart" : + this.flags & FlowFlags.BranchLabel ? "FlowBranchLabel" : + this.flags & FlowFlags.LoopLabel ? "FlowLoopLabel" : + this.flags & FlowFlags.Assignment ? "FlowAssignment" : + this.flags & FlowFlags.TrueCondition ? "FlowTrueCondition" : + this.flags & FlowFlags.FalseCondition ? "FlowFalseCondition" : + this.flags & FlowFlags.SwitchClause ? "FlowSwitchClause" : + this.flags & FlowFlags.ArrayMutation ? "FlowArrayMutation" : + this.flags & FlowFlags.Call ? "FlowCall" : + this.flags & FlowFlags.ReduceLabel ? "FlowReduceLabel" : + this.flags & FlowFlags.Unreachable ? "FlowUnreachable" : + "UnknownFlow"; + const remainingFlags = this.flags & ~(FlowFlags.Referenced - 1); + return `${flowHeader}${remainingFlags ? ` (${formatFlowFlags(remainingFlags)})`: ""}`; + } + }, + __debugFlowFlags: { get(this: FlowNodeBase) { return formatEnum(this.flags, (ts as any).FlowFlags, /*isFlags*/ true); } }, + __debugToString: { value(this: FlowNodeBase) { return formatControlFlowGraph(this); } } + }); + } + } + + export function attachFlowNodeDebugInfo(flowNode: FlowNodeBase) { if (isDebugInfoEnabled) { - if (!("__debugFlowFlags" in flowNode)) { // eslint-disable-line no-in-operator - Object.defineProperties(flowNode, { - __debugFlowFlags: { get(this: FlowNode) { return formatEnum(this.flags, (ts as any).FlowFlags, /*isFlags*/ true); } }, - __debugToString: { value(this: FlowNode) { return formatControlFlowGraph(this); } } - }); + if (typeof Object.setPrototypeOf === "function") { + // if we're in es2015, attach the method to a shared prototype for `FlowNode` + // so the method doesn't show up in the watch window. + if (!flowNodeProto) { + flowNodeProto = Object.create(Object.prototype) as FlowNodeBase; + attachFlowNodeDebugInfoWorker(flowNodeProto); + } + Object.setPrototypeOf(flowNode, flowNodeProto); + } + else { + // not running in an es2015 environment, attach the method directly. + attachFlowNodeDebugInfoWorker(flowNode); + } + } + } + + let nodeArrayProto: NodeArray | undefined; + + function attachNodeArrayDebugInfoWorker(array: NodeArray) { + if (!("__tsDebuggerDisplay" in array)) { // eslint-disable-line no-in-operator + Object.defineProperties(array, { + __tsDebuggerDisplay: { + value(this: NodeArray, defaultValue: string) { + // An `Array` with extra properties is rendered as `[A, B, prop1: 1, prop2: 2]`. Most of + // these aren't immediately useful so we trim off the `prop1: ..., prop2: ...` part from the + // formatted string. + defaultValue = String(defaultValue).replace(/(?:,[\s\w\d_]+:[^,]+)+\]$/, "]"); + return `NodeArray ${defaultValue}`; + } + } + }); + } + } + + export function attachNodeArrayDebugInfo(array: NodeArray) { + if (isDebugInfoEnabled) { + if (typeof Object.setPrototypeOf === "function") { + // if we're in es2015, attach the method to a shared prototype for `NodeArray` + // so the method doesn't show up in the watch window. + if (!nodeArrayProto) { + nodeArrayProto = Object.create(Array.prototype) as NodeArray; + attachNodeArrayDebugInfoWorker(nodeArrayProto); + } + Object.setPrototypeOf(array, nodeArrayProto); + } + else { + // not running in an es2015 environment, attach the method directly. + attachNodeArrayDebugInfoWorker(array); } } } @@ -413,15 +491,86 @@ namespace ts { export function enableDebugInfo() { if (isDebugInfoEnabled) return; + // avoid recomputing + let weakTypeTextMap: WeakMap | undefined; + let weakNodeTextMap: WeakMap | undefined; + + function getWeakTypeTextMap() { + if (weakTypeTextMap === undefined) { + if (typeof WeakMap === "function") weakTypeTextMap = new WeakMap(); + } + return weakTypeTextMap; + } + + function getWeakNodeTextMap() { + if (weakNodeTextMap === undefined) { + if (typeof WeakMap === "function") weakNodeTextMap = new WeakMap(); + } + return weakNodeTextMap; + } + + // Add additional properties in debug mode to assist with debugging. Object.defineProperties(objectAllocator.getSymbolConstructor().prototype, { + // for use with vscode-js-debug's new customDescriptionGenerator in launch.json + __tsDebuggerDisplay: { + value(this: Symbol) { + const symbolHeader = + this.flags & SymbolFlags.Transient ? "TransientSymbol" : + "Symbol"; + const remainingSymbolFlags = this.flags & ~SymbolFlags.Transient; + return `${symbolHeader} '${symbolName(this)}'${remainingSymbolFlags ? ` (${formatSymbolFlags(remainingSymbolFlags)})` : ""}`; + } + }, __debugFlags: { get(this: Symbol) { return formatSymbolFlags(this.flags); } } }); Object.defineProperties(objectAllocator.getTypeConstructor().prototype, { + // for use with vscode-js-debug's new customDescriptionGenerator in launch.json + __tsDebuggerDisplay: { + value(this: Type) { + const typeHeader = + this.flags & TypeFlags.Nullable ? "NullableType" : + this.flags & TypeFlags.StringOrNumberLiteral ? `LiteralType ${JSON.stringify((this as LiteralType).value)}` : + this.flags & TypeFlags.BigIntLiteral ? `LiteralType ${(this as BigIntLiteralType).value.negative ? "-" : ""}${(this as BigIntLiteralType).value.base10Value}n` : + this.flags & TypeFlags.UniqueESSymbol ? "UniqueESSymbolType" : + this.flags & TypeFlags.Enum ? "EnumType" : + this.flags & TypeFlags.Intrinsic ? `IntrinsicType ${(this as IntrinsicType).intrinsicName}` : + this.flags & TypeFlags.Union ? "UnionType" : + this.flags & TypeFlags.Intersection ? "IntersectionType" : + this.flags & TypeFlags.Index ? "IndexType" : + this.flags & TypeFlags.IndexedAccess ? "IndexedAccessType" : + this.flags & TypeFlags.Conditional ? "ConditionalType" : + this.flags & TypeFlags.Substitution ? "SubstitutionType" : + this.flags & TypeFlags.TypeParameter ? "TypeParameter" : + this.flags & TypeFlags.Object ? + (this as ObjectType).objectFlags & ObjectFlags.ClassOrInterface ? "InterfaceType" : + (this as ObjectType).objectFlags & ObjectFlags.Reference ? "TypeReference" : + (this as ObjectType).objectFlags & ObjectFlags.Tuple ? "TupleType" : + (this as ObjectType).objectFlags & ObjectFlags.Anonymous ? "AnonymousType" : + (this as ObjectType).objectFlags & ObjectFlags.Mapped ? "MappedType" : + (this as ObjectType).objectFlags & ObjectFlags.ReverseMapped ? "ReverseMappedType" : + (this as ObjectType).objectFlags & ObjectFlags.EvolvingArray ? "EvolvingArrayType" : + "ObjectType" : + "Type"; + const remainingObjectFlags = this.flags & TypeFlags.Object ? (this as ObjectType).objectFlags & ~ObjectFlags.ObjectTypeKindMask : 0; + return `${typeHeader}${this.symbol ? ` '${symbolName(this.symbol)}'` : ""}${remainingObjectFlags ? ` (${formatObjectFlags(remainingObjectFlags)})` : ""}`; + } + }, __debugFlags: { get(this: Type) { return formatTypeFlags(this.flags); } }, __debugObjectFlags: { get(this: Type) { return this.flags & TypeFlags.Object ? formatObjectFlags((this).objectFlags) : ""; } }, - __debugTypeToString: { value(this: Type) { return this.checker.typeToString(this); } }, + __debugTypeToString: { + value(this: Type) { + // avoid recomputing + const map = getWeakTypeTextMap(); + let text = map?.get(this); + if (text === undefined) { + text = this.checker.typeToString(this); + map?.set(this, text); + } + return text; + } + }, }); const nodeConstructors = [ @@ -434,6 +583,50 @@ namespace ts { for (const ctor of nodeConstructors) { if (!ctor.prototype.hasOwnProperty("__debugKind")) { Object.defineProperties(ctor.prototype, { + // for use with vscode-js-debug's new customDescriptionGenerator in launch.json + __tsDebuggerDisplay: { + value(this: Node) { + const nodeHeader = + isGeneratedIdentifier(this) ? "GeneratedIdentifier" : + isIdentifier(this) ? `Identifier '${idText(this)}'` : + isPrivateIdentifier(this) ? `PrivateIdentifier '${idText(this)}'` : + isStringLiteral(this) ? `StringLiteral ${JSON.stringify(this.text.length < 10 ? this.text : this.text.slice(10) + "...")}` : + isNumericLiteral(this) ? `NumericLiteral ${this.text}` : + isBigIntLiteral(this) ? `BigIntLiteral ${this.text}n` : + isTypeParameterDeclaration(this) ? "TypeParameterDeclaration" : + isParameter(this) ? "ParameterDeclaration" : + isConstructorDeclaration(this) ? "ConstructorDeclaration" : + isGetAccessorDeclaration(this) ? "GetAccessorDeclaration" : + isSetAccessorDeclaration(this) ? "SetAccessorDeclaration" : + isCallSignatureDeclaration(this) ? "CallSignatureDeclaration" : + isConstructSignatureDeclaration(this) ? "ConstructSignatureDeclaration" : + isIndexSignatureDeclaration(this) ? "IndexSignatureDeclaration" : + isTypePredicateNode(this) ? "TypePredicateNode" : + isTypeReferenceNode(this) ? "TypeReferenceNode" : + isFunctionTypeNode(this) ? "FunctionTypeNode" : + isConstructorTypeNode(this) ? "ConstructorTypeNode" : + isTypeQueryNode(this) ? "TypeQueryNode" : + isTypeLiteralNode(this) ? "TypeLiteralNode" : + isArrayTypeNode(this) ? "ArrayTypeNode" : + isTupleTypeNode(this) ? "TupleTypeNode" : + isOptionalTypeNode(this) ? "OptionalTypeNode" : + isRestTypeNode(this) ? "RestTypeNode" : + isUnionTypeNode(this) ? "UnionTypeNode" : + isIntersectionTypeNode(this) ? "IntersectionTypeNode" : + isConditionalTypeNode(this) ? "ConditionalTypeNode" : + isInferTypeNode(this) ? "InferTypeNode" : + isParenthesizedTypeNode(this) ? "ParenthesizedTypeNode" : + isThisTypeNode(this) ? "ThisTypeNode" : + isTypeOperatorNode(this) ? "TypeOperatorNode" : + isIndexedAccessTypeNode(this) ? "IndexedAccessTypeNode" : + isMappedTypeNode(this) ? "MappedTypeNode" : + isLiteralTypeNode(this) ? "LiteralTypeNode" : + isNamedTupleMember(this) ? "NamedTupleMember" : + isImportTypeNode(this) ? "ImportTypeNode" : + formatSyntaxKind(this.kind); + return `${nodeHeader}${this.flags ? ` (${formatNodeFlags(this.flags)})` : ""}`; + } + }, __debugKind: { get(this: Node) { return formatSyntaxKind(this.kind); } }, __debugNodeFlags: { get(this: Node) { return formatNodeFlags(this.flags); } }, __debugModifierFlags: { get(this: Node) { return formatModifierFlags(getEffectiveModifierFlagsNoCache(this)); } }, @@ -443,9 +636,16 @@ namespace ts { __debugGetText: { value(this: Node, includeTrivia?: boolean) { if (nodeIsSynthesized(this)) return ""; - const parseNode = getParseTreeNode(this); - const sourceFile = parseNode && getSourceFileOfNode(parseNode); - return sourceFile ? getSourceTextOfNodeFromSourceFile(sourceFile, parseNode!, includeTrivia) : ""; + // avoid recomputing + const map = getWeakNodeTextMap(); + let text = map?.get(this); + if (text === undefined) { + const parseNode = getParseTreeNode(this); + const sourceFile = parseNode && getSourceFileOfNode(parseNode); + text = sourceFile ? getSourceTextOfNodeFromSourceFile(sourceFile, parseNode!, includeTrivia) : ""; + map?.set(this, text); + } + return text; } } }); diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index cc5ed962ab9..511f41157a5 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -659,7 +659,7 @@ "category": "Error", "code": 1207 }, - "All files must be modules when the '--isolatedModules' flag is provided.": { + "'{0}' cannot be compiled under '--isolatedModules' because it is considered a global script file. Add an import, export, or an empty 'export {}' statement to make it a module.": { "category": "Error", "code": 1208 }, @@ -851,10 +851,6 @@ "category": "Error", "code": 1257 }, - "Definite assignment assertions can only be used along with a type annotation.": { - "category": "Error", - "code": 1258 - }, "Module '{0}' can only be default-imported using the '{1}' flag": { "category": "Error", "code": 1259 @@ -871,6 +867,14 @@ "category": "Error", "code": 1262 }, + "Declarations with initializers cannot also have definite assignment assertions.": { + "category": "Error", + "code": 1263 + }, + "Declarations with definite assignment assertions must also have type annotations.": { + "category": "Error", + "code": 1264 + }, "'with' statements are not allowed in an async function block.": { "category": "Error", @@ -936,7 +940,7 @@ "category": "Error", "code": 1325 }, - "Dynamic import cannot have type arguments": { + "Dynamic import cannot have type arguments.": { "category": "Error", "code": 1326 }, @@ -1008,7 +1012,7 @@ "category": "Error", "code": 1344 }, - "An expression of type 'void' cannot be tested for truthiness": { + "An expression of type 'void' cannot be tested for truthiness.": { "category": "Error", "code": 1345 }, @@ -1164,7 +1168,34 @@ "category": "Error", "code": 1384 }, - + "Function type notation must be parenthesized when used in a union type.": { + "category": "Error", + "code": 1385 + }, + "Constructor type notation must be parenthesized when used in a union type.": { + "category": "Error", + "code": 1386 + }, + "Function type notation must be parenthesized when used in an intersection type.": { + "category": "Error", + "code": 1387 + }, + "Constructor type notation must be parenthesized when used in an intersection type.": { + "category": "Error", + "code": 1388 + }, + "'{0}' is not allowed as a variable declaration name.": { + "category": "Error", + "code": 1389 + }, + "Provides a root package name when using outFile with declarations.": { + "category": "Message", + "code": 1390 + }, + "The `bundledPackageName` option must be provided when using outFile and node module resolution with declaration emit.": { + "category": "Error", + "code": 1391 + }, "The types of '{0}' are incompatible between these types.": { "category": "Error", "code": 2200 @@ -1670,6 +1701,10 @@ "category": "Error", "code": 2418 }, + "Types of construct signatures are incompatible.": { + "category": "Error", + "code": 2419 + }, "Class '{0}' incorrectly implements interface '{1}'.": { "category": "Error", "code": 2420 @@ -2254,7 +2289,7 @@ "category": "Error", "code": 2575 }, - "Property '{0}' is a static member of type '{1}'": { + "Property '{0}' is a static member of type '{1}'.": { "category": "Error", "code": 2576 }, @@ -2266,15 +2301,15 @@ "category": "Error", "code": 2578 }, - "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node`.": { + "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`.": { "category": "Error", "code": 2580 }, - "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.": { + "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`.": { "category": "Error", "code": 2581 }, - "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.": { + "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`.": { "category": "Error", "code": 2582 }, @@ -2310,15 +2345,15 @@ "category": "Error", "code": 2590 }, - "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node` and then add `node` to the types field in your tsconfig.": { + "Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node` and then add `node` to the types field in your tsconfig.": { "category": "Error", "code": 2591 }, - "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery` and then add `jquery` to the types field in your tsconfig.": { + "Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery` and then add `jquery` to the types field in your tsconfig.": { "category": "Error", "code": 2592 }, - "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.": { + "Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha` and then add `jest` or `mocha` to the types field in your tsconfig.": { "category": "Error", "code": 2593 }, @@ -2591,6 +2626,10 @@ "category": "Error", "code": 2689 }, + "'{0}' only refers to a type, but is being used as a value here. Did you mean to use '{1} in {0}'?": { + "category": "Error", + "code": 2690 + }, "An import path cannot end with a '{0}' extension. Consider importing '{1}' instead.": { "category": "Error", "code": 2691 @@ -2724,7 +2763,7 @@ "category": "Error", "code": 2723 }, - "Module '{0}' has no exported member '{1}'. Did you mean '{2}'?": { + "'{0}' has no exported member named '{1}'. Did you mean '{2}'?": { "category": "Error", "code": 2724 }, @@ -2756,7 +2795,7 @@ "category": "Error", "code": 2731 }, - "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension": { + "Cannot find module '{0}'. Consider using '--resolveJsonModule' to import module with '.json' extension.": { "category": "Error", "code": 2732 }, @@ -2996,6 +3035,19 @@ "category": "Error", "code": 2791 }, + "Cannot find module '{0}'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?": { + "category": "Error", + "code": 2792 + }, + + "Expected {0} arguments, but got {1}. Did you forget to include 'void' in your type argument to 'Promise'?": { + "category": "Error", + "code": 2794 + }, + "The 'intrinsic' keyword can only be used to declare compiler provided intrinsic types.": { + "category": "Error", + "code": 2795 + }, "Import declaration '{0}' is using private name '{1}'.": { "category": "Error", @@ -3041,6 +3093,10 @@ "category": "Error", "code": 4020 }, + "'extends' clause of exported class has or is using private name '{0}'.": { + "category": "Error", + "code": 4021 + }, "'extends' clause of exported interface '{0}' has or is using private name '{1}'.": { "category": "Error", "code": 4022 @@ -3446,10 +3502,6 @@ "category": "Error", "code": 5059 }, - "Option 'paths' cannot be used without specifying '--baseUrl' option.": { - "category": "Error", - "code": 5060 - }, "Pattern '{0}' can have at most one '*' character.": { "category": "Error", "code": 5061 @@ -3562,6 +3614,14 @@ "category": "Error", "code": 5088 }, + "Option '{0}' cannot be specified when option 'jsx' is '{1}'.": { + "category": "Error", + "code": 5089 + }, + "Non-relative paths are not allowed when 'baseUrl' is not set. Did you forget a leading './'?": { + "category": "Error", + "code": 5090 + }, "Generates a sourcemap for each corresponding '.d.ts' file.": { "category": "Message", @@ -4329,7 +4389,7 @@ "category": "Message", "code": 6204 }, - "All type parameters are unused": { + "All type parameters are unused.": { "category": "Error", "code": 6205 }, @@ -4449,6 +4509,22 @@ "category": "Error", "code": 6234 }, + "Disable loading referenced projects.": { + "category": "Message", + "code": 6235 + }, + "Arguments for the rest parameter '{0}' were not provided.": { + "category": "Error", + "code": 6236 + }, + "Generates an event trace and a list of types.": { + "category": "Message", + "code": 6237 + }, + "Specify the module specifier to be used to import the `jsx` and `jsxs` factory functions from. eg, react": { + "category": "Error", + "code": 6238 + }, "Projects to reference": { "category": "Message", @@ -4654,6 +4730,11 @@ "code": 6504 }, + "Include 'undefined' in index signature results": { + "category": "Message", + "code": 6800 + }, + "Variable '{0}' implicitly has an '{1}' type.": { "category": "Error", "code": 7005 @@ -4764,7 +4845,7 @@ "category": "Error", "code": 7034 }, - "Try `npm install @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`": { + "Try `npm i --save-dev @types/{1}` if it exists or add a new declaration (.d.ts) file containing `declare module '{0}';`": { "category": "Error", "code": 7035 }, @@ -4848,6 +4929,10 @@ "category": "Error", "code": 7055 }, + "The inferred type of this node exceeds the maximum length the compiler will serialize. An explicit type annotation is needed.": { + "category": "Error", + "code": 7056 + }, "You cannot rename this element.": { "category": "Error", @@ -5291,6 +5376,10 @@ "category": "Message", "code": 95002 }, + "Convert '{0}' to '{1} in {0}'": { + "category": "Message", + "code": 95003 + }, "Extract to {0} in {1}": { "category": "Message", "code": 95004 @@ -5359,6 +5448,10 @@ "category": "Message", "code": 95020 }, + "Convert all type literals to mapped type": { + "category": "Message", + "code": 95021 + }, "Add all missing members": { "category": "Message", "code": 95022 @@ -5827,6 +5920,30 @@ "category": "Message", "code": 95138 }, + "Convert to optional chain expression": { + "category": "Message", + "code": 95139 + }, + "Could not find convertible access expression": { + "category": "Message", + "code": 95140 + }, + "Could not find matching access expressions": { + "category": "Message", + "code": 95141 + }, + "Can only convert logical AND access chains": { + "category": "Message", + "code": 95142 + }, + "Add 'void' to Promise resolved without a value": { + "category": "Message", + "code": 95143 + }, + "Add 'void' to all Promises resolved without a value": { + "category": "Message", + "code": 95144 + }, "No value exists in scope for the shorthand property '{0}'. Either declare one or provide an initializer.": { "category": "Error", @@ -5840,7 +5957,7 @@ "category": "Error", "code": 18007 }, - "Private identifiers cannot be used as parameters": { + "Private identifiers cannot be used as parameters.": { "category": "Error", "code": 18009 }, @@ -5880,7 +5997,7 @@ "category": "Error", "code": 18018 }, - "'{0}' modifier cannot be used with a private identifier": { + "'{0}' modifier cannot be used with a private identifier.": { "category": "Error", "code": 18019 }, diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 2040a4af642..237d3fee9cd 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -300,9 +300,17 @@ namespace ts { sourceFiles: sourceFileOrBundle.sourceFiles.map(file => relativeToBuildInfo(getNormalizedAbsolutePath(file.fileName, host.getCurrentDirectory()))) }; } + tracing.begin(tracing.Phase.Emit, "emitJsFileOrBundle", { jsFilePath }); emitJsFileOrBundle(sourceFileOrBundle, jsFilePath, sourceMapFilePath, relativeToBuildInfo); + tracing.end(); + + tracing.begin(tracing.Phase.Emit, "emitDeclarationFileOrBundle", { declarationFilePath }); emitDeclarationFileOrBundle(sourceFileOrBundle, declarationFilePath, declarationMapPath, relativeToBuildInfo); + tracing.end(); + + tracing.begin(tracing.Phase.Emit, "emitBuildInfo", { buildInfoPath }); emitBuildInfo(bundleBuildInfo, buildInfoPath); + tracing.end(); if (!emitSkipped && emittedFilesList) { if (!emitOnlyDtsFiles) { @@ -845,6 +853,7 @@ namespace ts { let reservedNamesStack: Set[]; // Stack of TempFlags reserved in enclosing name generation scopes. let reservedNames: Set; // TempFlags to reserve in nested name generation scopes. let preserveSourceNewlines = printerOptions.preserveSourceNewlines; // Can be overridden inside nodes with the `IgnoreSourceNewlines` emit flag. + let nextListElementPos: number | undefined; // See comment in `getLeadingLineTerminatorCount`. let writer: EmitTextWriter; let ownWriter: EmitTextWriter; // Reusable `EmitTextWriter` for basic printing. @@ -861,6 +870,8 @@ namespace ts { let sourceMapGenerator: SourceMapGenerator | undefined; let sourceMapSource: SourceMapSource; let sourceMapSourceIndex = -1; + let mostRecentlyAddedSourceMapSource: SourceMapSource; + let mostRecentlyAddedSourceMapSourceIndex = -1; // Comments let containerPos = -1; @@ -1310,6 +1321,8 @@ namespace ts { return emitConstructSignature(node); case SyntaxKind.IndexSignature: return emitIndexSignature(node); + case SyntaxKind.TemplateLiteralTypeSpan: + return emitTemplateTypeSpan(node); // Types case SyntaxKind.TypePredicate: @@ -1354,6 +1367,8 @@ namespace ts { return emitMappedType(node); case SyntaxKind.LiteralType: return emitLiteralType(node); + case SyntaxKind.TemplateLiteralType: + return emitTemplateType(node); case SyntaxKind.ImportType: return emitImportTypeNode(node); case SyntaxKind.JSDocAllType: @@ -1545,6 +1560,10 @@ namespace ts { case SyntaxKind.JSDocClassTag: case SyntaxKind.JSDocTag: return emitJSDocSimpleTag(node as JSDocTag); + case SyntaxKind.JSDocSeeTag: + return emitJSDocSeeTag(node as JSDocSeeTag); + case SyntaxKind.JSDocNameReference: + return emitJSDocNameReference(node as JSDocNameReference); case SyntaxKind.JSDocComment: return emitJSDoc(node as JSDoc); @@ -2003,6 +2022,11 @@ namespace ts { writeTrailingSemicolon(); } + function emitTemplateTypeSpan(node: TemplateLiteralTypeSpan) { + emit(node.type); + emit(node.literal); + } + function emitSemicolonClassElement() { writeTrailingSemicolon(); } @@ -2195,6 +2219,12 @@ namespace ts { writePunctuation("["); pipelineEmit(EmitHint.MappedTypeParameter, node.typeParameter); + if (node.nameType) { + writeSpace(); + writeKeyword("as"); + writeSpace(); + emit(node.nameType); + } writePunctuation("]"); if (node.questionToken) { @@ -2221,6 +2251,11 @@ namespace ts { emitExpression(node.literal); } + function emitTemplateType(node: TemplateLiteralTypeNode) { + emit(node.head); + emitList(node, node.templateSpans, ListFormat.TemplateExpressionSpans); + } + function emitImportTypeNode(node: ImportTypeNode) { if (node.isTypeOf) { writeKeyword("typeof"); @@ -3500,6 +3535,19 @@ namespace ts { emitJSDocComment(tag.comment); } + function emitJSDocSeeTag(tag: JSDocSeeTag) { + emitJSDocTagName(tag.tagName); + emit(tag.name); + emitJSDocComment(tag.comment); + } + + function emitJSDocNameReference(node: JSDocNameReference) { + writeSpace(); + writePunctuation("{"); + emit(node.name); + writePunctuation("}"); + } + function emitJSDocHeritageTag(tag: JSDocImplementsTag | JSDocAugmentsTag) { emitJSDocTagName(tag.tagName); writeSpace(); @@ -4104,6 +4152,7 @@ namespace ts { shouldEmitInterveningComments = mayEmitInterveningComments; } + nextListElementPos = child.pos; emit(child); if (shouldDecreaseIndentAfterEmit) { @@ -4312,11 +4361,32 @@ namespace ts { if (firstChild === undefined) { return rangeIsOnSingleLine(parentNode, currentSourceFile!) ? 0 : 1; } + if (firstChild.pos === nextListElementPos) { + // If this child starts at the beginning of a list item in a parent list, its leading + // line terminators have already been written as the separating line terminators of the + // parent list. Example: + // + // class Foo { + // constructor() {} + // public foo() {} + // } + // + // The outer list is the list of class members, with one line terminator between the + // constructor and the method. The constructor is written, the separating line terminator + // is written, and then we start emitting the method. Its modifiers ([public]) constitute an inner + // list, so we look for its leading line terminators. If we didn't know that we had already + // written a newline as part of the parent list, it would appear that we need to write a + // leading newline to start the modifiers. + return 0; + } if (firstChild.kind === SyntaxKind.JsxText) { // JsxText will be written with its leading whitespace, so don't add more manually. return 0; } - if (!positionIsSynthesized(parentNode.pos) && !nodeIsSynthesized(firstChild) && (!firstChild.parent || firstChild.parent === parentNode)) { + if (!positionIsSynthesized(parentNode.pos) && + !nodeIsSynthesized(firstChild) && + (!firstChild.parent || getOriginalNode(firstChild.parent) === getOriginalNode(parentNode as Node)) + ) { if (preserveSourceNewlines) { return getEffectiveLines( includeComments => getLinesBetweenPositionAndPrecedingNonWhitespaceCharacter( @@ -4376,9 +4446,10 @@ namespace ts { } if (!positionIsSynthesized(parentNode.pos) && !nodeIsSynthesized(lastChild) && (!lastChild.parent || lastChild.parent === parentNode)) { if (preserveSourceNewlines) { + const end = isNodeArray(children) && !positionIsSynthesized(children.end) ? children.end : lastChild.end; return getEffectiveLines( includeComments => getLinesBetweenPositionAndNextNonWhitespaceCharacter( - lastChild.end, + end, parentNode.end, currentSourceFile!, includeComments)); @@ -4520,7 +4591,11 @@ namespace ts { } } - return getLiteralText(node, currentSourceFile!, neverAsciiEscape, jsxAttributeEscape); + const flags = (neverAsciiEscape ? GetLiteralTextFlags.NeverAsciiEscape : 0) + | (jsxAttributeEscape ? GetLiteralTextFlags.JsxAttributeEscape : 0) + | (printerOptions.terminateUnterminatedLiterals ? GetLiteralTextFlags.TerminateUnterminatedLiterals : 0); + + return getLiteralText(node, currentSourceFile!, flags); } /** @@ -5313,9 +5388,10 @@ namespace ts { function emitSourcePos(source: SourceMapSource, pos: number) { if (source !== sourceMapSource) { const savedSourceMapSource = sourceMapSource; + const savedSourceMapSourceIndex = sourceMapSourceIndex; setSourceMapSource(source); emitPos(pos); - setSourceMapSource(savedSourceMapSource); + resetSourceMapSource(savedSourceMapSource, savedSourceMapSourceIndex); } else { emitPos(pos); @@ -5362,6 +5438,13 @@ namespace ts { sourceMapSource = source; + if (source === mostRecentlyAddedSourceMapSource) { + // Fast path for when the new source map is the most recently added, in which case + // we use its captured index without going through the source map generator. + sourceMapSourceIndex = mostRecentlyAddedSourceMapSourceIndex; + return; + } + if (isJsonSourceMapSource(source)) { return; } @@ -5370,6 +5453,14 @@ namespace ts { if (printerOptions.inlineSources) { sourceMapGenerator!.setSourceContent(sourceMapSourceIndex, source.text); } + + mostRecentlyAddedSourceMapSource = source; + mostRecentlyAddedSourceMapSourceIndex = sourceMapSourceIndex; + } + + function resetSourceMapSource(source: SourceMapSource, sourceIndex: number) { + sourceMapSource = source; + sourceMapSourceIndex = sourceIndex; } function isJsonSourceMapSource(sourceFile: SourceMapSource) { diff --git a/src/compiler/factory/emitHelpers.ts b/src/compiler/factory/emitHelpers.ts index 15f86bf5a43..212c141a6f9 100644 --- a/src/compiler/factory/emitHelpers.ts +++ b/src/compiler/factory/emitHelpers.ts @@ -843,6 +843,7 @@ namespace ts { // Class fields helpers export const classPrivateFieldGetHelper: UnscopedEmitHelper = { name: "typescript:classPrivateFieldGet", + importName: "__classPrivateFieldGet", scoped: false, text: ` var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, privateMap) { @@ -855,6 +856,7 @@ namespace ts { export const classPrivateFieldSetHelper: UnscopedEmitHelper = { name: "typescript:classPrivateFieldSet", + importName: "__classPrivateFieldSet", scoped: false, text: ` var __classPrivateFieldSet = (this && this.__classPrivateFieldSet) || function (receiver, privateMap, value) { diff --git a/src/compiler/factory/nodeFactory.ts b/src/compiler/factory/nodeFactory.ts index a9679f453fe..3d1b6fdb9a7 100644 --- a/src/compiler/factory/nodeFactory.ts +++ b/src/compiler/factory/nodeFactory.ts @@ -94,6 +94,8 @@ namespace ts { updateConstructSignature, createIndexSignature, updateIndexSignature, + createTemplateLiteralTypeSpan, + updateTemplateLiteralTypeSpan, createKeywordTypeNode, createTypePredicateNode, updateTypePredicateNode, @@ -138,6 +140,8 @@ namespace ts { updateMappedTypeNode, createLiteralTypeNode, updateLiteralTypeNode, + createTemplateLiteralType, + updateTemplateLiteralType, createObjectBindingPattern, updateObjectBindingPattern, createArrayBindingPattern, @@ -337,6 +341,10 @@ namespace ts { updateJSDocAugmentsTag, createJSDocImplementsTag, updateJSDocImplementsTag, + createJSDocSeeTag, + updateJSDocSeeTag, + createJSDocNameReference, + updateJSDocNameReference, // lazily load factory members for JSDoc tags with similar structure get createJSDocTypeTag() { return getJSDocTypeLikeTagCreateFunction(SyntaxKind.JSDocTypeTag); }, get updateJSDocTypeTag() { return getJSDocTypeLikeTagUpdateFunction(SyntaxKind.JSDocTypeTag); }, @@ -509,6 +517,7 @@ namespace ts { if (elements.transformFlags === undefined) { aggregateChildrenFlags(elements as MutableNodeArray); } + Debug.attachNodeArrayDebugInfo(elements); return elements; } @@ -520,6 +529,7 @@ namespace ts { setTextRangePosEnd(array, -1, -1); array.hasTrailingComma = !!hasTrailingComma; aggregateChildrenFlags(array); + Debug.attachNodeArrayDebugInfo(array); return array; } @@ -1594,6 +1604,23 @@ namespace ts { : node; } + // @api + function createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddle | TemplateTail) { + const node = createBaseNode(SyntaxKind.TemplateLiteralTypeSpan); + node.type = type; + node.literal = literal; + node.transformFlags = TransformFlags.ContainsTypeScript; + return node; + } + + // @api + function updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddle | TemplateTail) { + return node.type !== type + || node.literal !== literal + ? update(createTemplateLiteralTypeSpan(type, literal), node) + : node; + } + // // Types // @@ -1885,6 +1912,23 @@ namespace ts { : node; } + // @api + function createTemplateLiteralType(head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]) { + const node = createBaseNode(SyntaxKind.TemplateLiteralType); + node.head = head; + node.templateSpans = createNodeArray(templateSpans); + node.transformFlags = TransformFlags.ContainsTypeScript; + return node; + } + + // @api + function updateTemplateLiteralType(node: TemplateLiteralTypeNode, head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]) { + return node.head !== head + || node.templateSpans !== templateSpans + ? update(createTemplateLiteralType(head, templateSpans), node) + : node; + } + // @api function createImportTypeNode(argument: TypeNode, qualifier?: EntityName, typeArguments?: readonly TypeNode[], isTypeOf = false) { const node = createBaseNode(SyntaxKind.ImportType); @@ -1962,10 +2006,11 @@ namespace ts { } // @api - function createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode { + function createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode { const node = createBaseNode(SyntaxKind.MappedType); node.readonlyToken = readonlyToken; node.typeParameter = typeParameter; + node.nameType = nameType; node.questionToken = questionToken; node.type = type; node.transformFlags = TransformFlags.ContainsTypeScript; @@ -1973,12 +2018,13 @@ namespace ts { } // @api - function updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode { + function updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode { return node.readonlyToken !== readonlyToken || node.typeParameter !== typeParameter + || node.nameType !== nameType || node.questionToken !== questionToken || node.type !== type - ? update(createMappedTypeNode(readonlyToken, typeParameter, questionToken, type), node) + ? update(createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type), node) : node; } @@ -4257,6 +4303,36 @@ namespace ts { return node; } + // @api + function createJSDocSeeTag(tagName: Identifier | undefined, name: JSDocNameReference | undefined, comment?: string): JSDocSeeTag { + const node = createBaseJSDocTag(SyntaxKind.JSDocSeeTag, tagName ?? createIdentifier("see"), comment); + node.name = name; + return node; + } + + // @api + function updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, name: JSDocNameReference | undefined, comment?: string): JSDocSeeTag { + return node.tagName !== tagName + || node.name !== name + || node.comment !== comment + ? update(createJSDocSeeTag(tagName, name, comment), node) + : node; + } + + // @api + function createJSDocNameReference(name: EntityName): JSDocNameReference { + const node = createBaseNode(SyntaxKind.JSDocNameReference); + node.name = name; + return node; + } + + // @api + function updateJSDocNameReference(node: JSDocNameReference, name: EntityName): JSDocNameReference { + return node.name !== name + ? update(createJSDocNameReference(name), node) + : node; + } + // @api function updateJSDocImplementsTag(node: JSDocImplementsTag, tagName: Identifier = getDefaultTagName(node), className: JSDocImplementsTag["class"], comment: string | undefined): JSDocImplementsTag { return node.tagName !== tagName diff --git a/src/compiler/factory/nodeTests.ts b/src/compiler/factory/nodeTests.ts index 185b4d61e38..26030947175 100644 --- a/src/compiler/factory/nodeTests.ts +++ b/src/compiler/factory/nodeTests.ts @@ -177,6 +177,10 @@ namespace ts { return node.kind === SyntaxKind.TupleType; } + export function isNamedTupleMember(node: Node): node is NamedTupleMember { + return node.kind === SyntaxKind.NamedTupleMember; + } + export function isOptionalTypeNode(node: Node): node is OptionalTypeNode { return node.kind === SyntaxKind.OptionalType; } @@ -229,6 +233,10 @@ namespace ts { return node.kind === SyntaxKind.ImportType; } + export function isTemplateLiteralTypeSpan(node: Node): node is TemplateLiteralTypeSpan { + return node.kind === SyntaxKind.TemplateLiteralTypeSpan; + } + // Binding patterns export function isObjectBindingPattern(node: Node): node is ObjectBindingPattern { @@ -691,6 +699,10 @@ namespace ts { return node.kind === SyntaxKind.JSDocTypeExpression; } + export function isJSDocNameReference(node: Node): node is JSDocNameReference { + return node.kind === SyntaxKind.JSDocNameReference; + } + export function isJSDocAllType(node: Node): node is JSDocAllType { return node.kind === SyntaxKind.JSDocAllType; } diff --git a/src/compiler/factory/utilities.ts b/src/compiler/factory/utilities.ts index a2cd08f510e..770600d94b7 100644 --- a/src/compiler/factory/utilities.ts +++ b/src/compiler/factory/utilities.ts @@ -490,7 +490,7 @@ namespace ts { */ export function getLocalNameForExternalImport(factory: NodeFactory, node: ImportDeclaration | ExportDeclaration | ImportEqualsDeclaration, sourceFile: SourceFile): Identifier | undefined { const namespaceDeclaration = getNamespaceDeclarationNode(node); - if (namespaceDeclaration && !isDefaultImport(node)) { + if (namespaceDeclaration && !isDefaultImport(node) && !isExportNamespaceAsDefaultDeclaration(node)) { const name = namespaceDeclaration.name; return isGeneratedIdentifier(name) ? name : factory.createIdentifier(getSourceTextOfNodeFromSourceFile(sourceFile, name) || idText(name)); } diff --git a/src/compiler/moduleNameResolver.ts b/src/compiler/moduleNameResolver.ts index ad331c60be7..fbd4f57a4a0 100644 --- a/src/compiler/moduleNameResolver.ts +++ b/src/compiler/moduleNameResolver.ts @@ -789,12 +789,15 @@ namespace ts { function tryLoadModuleUsingPathsIfEligible(extensions: Extensions, moduleName: string, loader: ResolutionKindSpecificLoader, state: ModuleResolutionState) { const { baseUrl, paths } = state.compilerOptions; - if (baseUrl && paths && !pathIsRelative(moduleName)) { + if (paths && !pathIsRelative(moduleName)) { if (state.traceEnabled) { - trace(state.host, Diagnostics.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1, baseUrl, moduleName); + if (baseUrl) { + trace(state.host, Diagnostics.baseUrl_option_is_set_to_0_using_this_value_to_resolve_non_relative_module_name_1, baseUrl, moduleName); + } trace(state.host, Diagnostics.paths_option_is_specified_looking_for_a_pattern_to_match_module_name_0, moduleName); } - return tryLoadModuleUsingPaths(extensions, moduleName, baseUrl, paths, loader, /*onlyRecordFailures*/ false, state); + const baseDirectory = getPathsBasePath(state.compilerOptions, state.host)!; // Always defined when 'paths' is defined + return tryLoadModuleUsingPaths(extensions, moduleName, baseDirectory, paths, loader, /*onlyRecordFailures*/ false, state); } } @@ -1368,6 +1371,7 @@ namespace ts { } const resolved = forEach(paths[matchedPatternText], subst => { const path = matchedStar ? subst.replace("*", matchedStar) : subst; + // When baseUrl is not specified, the command line parser resolves relative paths to the config file location. const candidate = normalizePath(combinePaths(baseDirectory, path)); if (state.traceEnabled) { trace(state.host, Diagnostics.Trying_substitution_0_candidate_module_location_Colon_1, subst, path); diff --git a/src/compiler/moduleSpecifiers.ts b/src/compiler/moduleSpecifiers.ts index 96925b838e4..ce2a2336758 100644 --- a/src/compiler/moduleSpecifiers.ts +++ b/src/compiler/moduleSpecifiers.ts @@ -69,7 +69,7 @@ namespace ts.moduleSpecifiers { const info = getInfo(importingSourceFileName, host); const modulePaths = getAllModulePaths(importingSourceFileName, nodeModulesFileName, host); return firstDefined(modulePaths, - moduleFileName => tryGetModuleNameAsNodeModule(moduleFileName, info, host, compilerOptions, /*packageNameOnly*/ true)); + modulePath => tryGetModuleNameAsNodeModule(modulePath, info, host, compilerOptions, /*packageNameOnly*/ true)); } function getModuleSpecifierWorker( @@ -81,8 +81,8 @@ namespace ts.moduleSpecifiers { ): string { const info = getInfo(importingSourceFileName, host); const modulePaths = getAllModulePaths(importingSourceFileName, toFileName, host); - return firstDefined(modulePaths, moduleFileName => tryGetModuleNameAsNodeModule(moduleFileName, info, host, compilerOptions)) || - getLocalModuleSpecifier(toFileName, info, compilerOptions, preferences); + return firstDefined(modulePaths, modulePath => tryGetModuleNameAsNodeModule(modulePath, info, host, compilerOptions)) || + getLocalModuleSpecifier(toFileName, info, compilerOptions, host, preferences); } /** Returns an import for each symlink and for the realpath. */ @@ -101,8 +101,48 @@ namespace ts.moduleSpecifiers { const modulePaths = getAllModulePaths(importingSourceFile.path, moduleSourceFile.originalFileName, host); const preferences = getPreferences(userPreferences, compilerOptions, importingSourceFile); - const global = mapDefined(modulePaths, moduleFileName => tryGetModuleNameAsNodeModule(moduleFileName, info, host, compilerOptions)); - return global.length ? global : modulePaths.map(moduleFileName => getLocalModuleSpecifier(moduleFileName, info, compilerOptions, preferences)); + const importedFileIsInNodeModules = some(modulePaths, p => p.isInNodeModules); + + // Module specifier priority: + // 1. "Bare package specifiers" (e.g. "@foo/bar") resulting from a path through node_modules to a package.json's "types" entry + // 2. Specifiers generated using "paths" from tsconfig + // 3. Non-relative specfiers resulting from a path through node_modules (e.g. "@foo/bar/path/to/file") + // 4. Relative paths + let nodeModulesSpecifiers: string[] | undefined; + let pathsSpecifiers: string[] | undefined; + let relativeSpecifiers: string[] | undefined; + for (const modulePath of modulePaths) { + const specifier = tryGetModuleNameAsNodeModule(modulePath, info, host, compilerOptions); + nodeModulesSpecifiers = append(nodeModulesSpecifiers, specifier); + if (specifier && modulePath.isRedirect) { + // If we got a specifier for a redirect, it was a bare package specifier (e.g. "@foo/bar", + // not "@foo/bar/path/to/file"). No other specifier will be this good, so stop looking. + return nodeModulesSpecifiers!; + } + + if (!specifier && !modulePath.isRedirect) { + const local = getLocalModuleSpecifier(modulePath.path, info, compilerOptions, host, preferences); + if (pathIsBareSpecifier(local)) { + pathsSpecifiers = append(pathsSpecifiers, local); + } + else if (!importedFileIsInNodeModules || modulePath.isInNodeModules) { + // Why this extra conditional, not just an `else`? If some path to the file contained + // 'node_modules', but we can't create a non-relative specifier (e.g. "@foo/bar/path/to/file"), + // that means we had to go through a *sibling's* node_modules, not one we can access directly. + // If some path to the file was in node_modules but another was not, this likely indicates that + // we have a monorepo structure with symlinks. In this case, the non-node_modules path is + // probably the realpath, e.g. "../bar/path/to/file", but a relative path to another package + // in a monorepo is probably not portable. So, the module specifier we actually go with will be + // the relative path through node_modules, so that the declaration emitter can produce a + // portability error. (See declarationEmitReexportedSymlinkReference3) + relativeSpecifiers = append(relativeSpecifiers, local); + } + } + } + + return pathsSpecifiers?.length ? pathsSpecifiers : + nodeModulesSpecifiers?.length ? nodeModulesSpecifiers : + Debug.checkDefined(relativeSpecifiers); } interface Info { @@ -116,23 +156,28 @@ namespace ts.moduleSpecifiers { return { getCanonicalFileName, sourceDirectory }; } - function getLocalModuleSpecifier(moduleFileName: string, { getCanonicalFileName, sourceDirectory }: Info, compilerOptions: CompilerOptions, { ending, relativePreference }: Preferences): string { - const { baseUrl, paths, rootDirs } = compilerOptions; + function getLocalModuleSpecifier(moduleFileName: string, { getCanonicalFileName, sourceDirectory }: Info, compilerOptions: CompilerOptions, host: ModuleSpecifierResolutionHost, { ending, relativePreference }: Preferences): string { + const { baseUrl, paths, rootDirs, bundledPackageName } = compilerOptions; const relativePath = rootDirs && tryGetModuleNameFromRootDirs(rootDirs, moduleFileName, sourceDirectory, getCanonicalFileName, ending, compilerOptions) || removeExtensionAndIndexPostFix(ensurePathIsNonModuleName(getRelativePathFromDirectory(sourceDirectory, moduleFileName, getCanonicalFileName)), ending, compilerOptions); - if (!baseUrl || relativePreference === RelativePreference.Relative) { + if (!baseUrl && !paths || relativePreference === RelativePreference.Relative) { return relativePath; } - const relativeToBaseUrl = getRelativePathIfInDirectory(moduleFileName, baseUrl, getCanonicalFileName); + const baseDirectory = getPathsBasePath(compilerOptions, host) || baseUrl!; + const relativeToBaseUrl = getRelativePathIfInDirectory(moduleFileName, baseDirectory, getCanonicalFileName); if (!relativeToBaseUrl) { return relativePath; } - const importRelativeToBaseUrl = removeExtensionAndIndexPostFix(relativeToBaseUrl, ending, compilerOptions); - const fromPaths = paths && tryGetModuleNameFromPaths(removeFileExtension(relativeToBaseUrl), importRelativeToBaseUrl, paths); - const nonRelative = fromPaths === undefined ? importRelativeToBaseUrl : fromPaths; + const bundledPkgReference = bundledPackageName ? combinePaths(bundledPackageName, relativeToBaseUrl) : relativeToBaseUrl; + const importRelativeToBaseUrl = removeExtensionAndIndexPostFix(bundledPkgReference, ending, compilerOptions); + const fromPaths = paths && tryGetModuleNameFromPaths(removeFileExtension(bundledPkgReference), importRelativeToBaseUrl, paths); + const nonRelative = fromPaths === undefined && baseUrl !== undefined ? importRelativeToBaseUrl : fromPaths; + if (!nonRelative) { + return relativePath; + } if (relativePreference === RelativePreference.NonRelative) { return nonRelative; @@ -161,10 +206,10 @@ namespace ts.moduleSpecifiers { return match ? match.length : 0; } - function comparePathsByNumberOfDirectorySeparators(a: string, b: string) { - return compareValues( - numberOfDirectorySeparators(a), - numberOfDirectorySeparators(b) + function comparePathsByRedirectAndNumberOfDirectorySeparators(a: ModulePath, b: ModulePath) { + return compareBooleans(b.isRedirect, a.isRedirect) || compareValues( + numberOfDirectorySeparators(a.path), + numberOfDirectorySeparators(b.path) ); } @@ -173,7 +218,7 @@ namespace ts.moduleSpecifiers { importedFileName: string, host: ModuleSpecifierResolutionHost, preferSymlinks: boolean, - cb: (fileName: string) => T | undefined + cb: (fileName: string, isRedirect: boolean) => T | undefined ): T | undefined { const getCanonicalFileName = hostGetCanonicalFileName(host); const cwd = host.getCurrentDirectory(); @@ -182,74 +227,83 @@ namespace ts.moduleSpecifiers { const importedFileNames = [...(referenceRedirect ? [referenceRedirect] : emptyArray), importedFileName, ...redirects]; const targets = importedFileNames.map(f => getNormalizedAbsolutePath(f, cwd)); if (!preferSymlinks) { - const result = forEach(targets, cb); + const result = forEach(targets, p => cb(p, referenceRedirect === p)); if (result) return result; } - const links = host.getProbableSymlinks - ? host.getProbableSymlinks(host.getSourceFiles()) + const links = host.getSymlinkCache + ? host.getSymlinkCache() : discoverProbableSymlinks(host.getSourceFiles(), getCanonicalFileName, cwd); + const symlinkedDirectories = links.getSymlinkedDirectories(); const compareStrings = (!host.useCaseSensitiveFileNames || host.useCaseSensitiveFileNames()) ? compareStringsCaseSensitive : compareStringsCaseInsensitive; - const result = forEachEntry(links, (resolved, path) => { - if (startsWithDirectory(importingFileName, resolved, getCanonicalFileName)) { + const result = symlinkedDirectories && forEachEntry(symlinkedDirectories, (resolved, path) => { + if (resolved === false) return undefined; + if (startsWithDirectory(importingFileName, resolved.realPath, getCanonicalFileName)) { return undefined; // Don't want to a package to globally import from itself } - const target = find(targets, t => compareStrings(t.slice(0, resolved.length + 1), resolved + "/") === Comparison.EqualTo); - if (target === undefined) return undefined; + return forEach(targets, target => { + if (compareStrings(target.slice(0, resolved.real.length), resolved.real) !== Comparison.EqualTo) { + return; + } - const relative = getRelativePathFromDirectory(resolved, target, getCanonicalFileName); - const option = resolvePath(path, relative); - if (!host.fileExists || host.fileExists(option)) { - const result = cb(option); - if (result) return result; - } + const relative = getRelativePathFromDirectory(resolved.real, target, getCanonicalFileName); + const option = resolvePath(path, relative); + if (!host.fileExists || host.fileExists(option)) { + const result = cb(option, target === referenceRedirect); + if (result) return result; + } + }); }); return result || - (preferSymlinks ? forEach(targets, cb) : undefined); + (preferSymlinks ? forEach(targets, p => cb(p, p === referenceRedirect)) : undefined); + } + + interface ModulePath { + path: string; + isInNodeModules: boolean; + isRedirect: boolean; } /** * Looks for existing imports that use symlinks to this module. * Symlinks will be returned first so they are preferred over the real path. */ - function getAllModulePaths(importingFileName: string, importedFileName: string, host: ModuleSpecifierResolutionHost): readonly string[] { + function getAllModulePaths(importingFileName: string, importedFileName: string, host: ModuleSpecifierResolutionHost): readonly ModulePath[] { const cwd = host.getCurrentDirectory(); const getCanonicalFileName = hostGetCanonicalFileName(host); - const allFileNames = new Map(); + const allFileNames = new Map(); let importedFileFromNodeModules = false; forEachFileNameOfModule( importingFileName, importedFileName, host, /*preferSymlinks*/ true, - path => { - // dont return value, so we collect everything - allFileNames.set(path, getCanonicalFileName(path)); - importedFileFromNodeModules = importedFileFromNodeModules || pathContainsNodeModules(path); + (path, isRedirect) => { + const isInNodeModules = pathContainsNodeModules(path); + allFileNames.set(path, { path: getCanonicalFileName(path), isRedirect, isInNodeModules }); + importedFileFromNodeModules = importedFileFromNodeModules || isInNodeModules; + // don't return value, so we collect everything } ); // Sort by paths closest to importing file Name directory - const sortedPaths: string[] = []; + const sortedPaths: ModulePath[] = []; for ( let directory = getDirectoryPath(toPath(importingFileName, cwd, getCanonicalFileName)); allFileNames.size !== 0; ) { const directoryStart = ensureTrailingDirectorySeparator(directory); - let pathsInDirectory: string[] | undefined; - allFileNames.forEach((canonicalFileName, fileName) => { - if (startsWith(canonicalFileName, directoryStart)) { - // If the importedFile is from node modules, use only paths in node_modules folder as option - if (!importedFileFromNodeModules || pathContainsNodeModules(fileName)) { - (pathsInDirectory || (pathsInDirectory = [])).push(fileName); - } + let pathsInDirectory: ModulePath[] | undefined; + allFileNames.forEach(({ path, isRedirect, isInNodeModules }, fileName) => { + if (startsWith(path, directoryStart)) { + (pathsInDirectory ||= []).push({ path: fileName, isRedirect, isInNodeModules }); allFileNames.delete(fileName); } }); if (pathsInDirectory) { if (pathsInDirectory.length > 1) { - pathsInDirectory.sort(comparePathsByNumberOfDirectorySeparators); + pathsInDirectory.sort(comparePathsByRedirectAndNumberOfDirectorySeparators); } sortedPaths.push(...pathsInDirectory); } @@ -259,7 +313,7 @@ namespace ts.moduleSpecifiers { } if (allFileNames.size) { const remainingPaths = arrayFrom(allFileNames.values()); - if (remainingPaths.length > 1) remainingPaths.sort(comparePathsByNumberOfDirectorySeparators); + if (remainingPaths.length > 1) remainingPaths.sort(comparePathsByRedirectAndNumberOfDirectorySeparators); sortedPaths.push(...remainingPaths); } return sortedPaths; @@ -310,18 +364,19 @@ namespace ts.moduleSpecifiers { : removeFileExtension(relativePath); } - function tryGetModuleNameAsNodeModule(moduleFileName: string, { getCanonicalFileName, sourceDirectory }: Info, host: ModuleSpecifierResolutionHost, options: CompilerOptions, packageNameOnly?: boolean): string | undefined { + function tryGetModuleNameAsNodeModule({ path, isRedirect }: ModulePath, { getCanonicalFileName, sourceDirectory }: Info, host: ModuleSpecifierResolutionHost, options: CompilerOptions, packageNameOnly?: boolean): string | undefined { if (!host.fileExists || !host.readFile) { return undefined; } - const parts: NodeModulePathParts = getNodeModulePathParts(moduleFileName)!; + const parts: NodeModulePathParts = getNodeModulePathParts(path)!; if (!parts) { return undefined; } // Simplify the full file path to something that can be resolved by Node. - let moduleSpecifier = moduleFileName; + let moduleSpecifier = path; + let isPackageRootPath = false; if (!packageNameOnly) { let packageRootIndex = parts.packageRootIndex; let moduleFileNameForExtensionless: string | undefined; @@ -330,12 +385,13 @@ namespace ts.moduleSpecifiers { const { moduleFileToTry, packageRootPath } = tryDirectoryWithPackageJson(packageRootIndex); if (packageRootPath) { moduleSpecifier = packageRootPath; + isPackageRootPath = true; break; } if (!moduleFileNameForExtensionless) moduleFileNameForExtensionless = moduleFileToTry; // try with next level of directory - packageRootIndex = moduleFileName.indexOf(directorySeparator, packageRootIndex + 1); + packageRootIndex = path.indexOf(directorySeparator, packageRootIndex + 1); if (packageRootIndex === -1) { moduleSpecifier = getExtensionlessFileName(moduleFileNameForExtensionless); break; @@ -343,6 +399,10 @@ namespace ts.moduleSpecifiers { } } + if (isRedirect && !isPackageRootPath) { + return undefined; + } + const globalTypingsCacheLocation = host.getGlobalTypingsCacheLocation && host.getGlobalTypingsCacheLocation(); // Get a path that's relative to node_modules or the importing file's path // if node_modules folder is in this folder or any of its parent folders, no need to keep it. @@ -358,16 +418,16 @@ namespace ts.moduleSpecifiers { return getEmitModuleResolutionKind(options) !== ModuleResolutionKind.NodeJs && packageName === nodeModulesDirectoryName ? undefined : packageName; function tryDirectoryWithPackageJson(packageRootIndex: number) { - const packageRootPath = moduleFileName.substring(0, packageRootIndex); + const packageRootPath = path.substring(0, packageRootIndex); const packageJsonPath = combinePaths(packageRootPath, "package.json"); - let moduleFileToTry = moduleFileName; + let moduleFileToTry = path; if (host.fileExists(packageJsonPath)) { const packageJsonContent = JSON.parse(host.readFile!(packageJsonPath)!); const versionPaths = packageJsonContent.typesVersions ? getPackageJsonTypesVersionsPaths(packageJsonContent.typesVersions) : undefined; if (versionPaths) { - const subModuleName = moduleFileName.slice(packageRootPath.length + 1); + const subModuleName = path.slice(packageRootPath.length + 1); const fromPaths = tryGetModuleNameFromPaths( removeFileExtension(subModuleName), removeExtensionAndIndexPostFix(subModuleName, Ending.Minimal, options), diff --git a/src/compiler/parser.ts b/src/compiler/parser.ts index 52d5ac671c0..a815a12db9a 100644 --- a/src/compiler/parser.ts +++ b/src/compiler/parser.ts @@ -206,6 +206,7 @@ namespace ts { case SyntaxKind.MappedType: return visitNode(cbNode, (node).readonlyToken) || visitNode(cbNode, (node).typeParameter) || + visitNode(cbNode, (node).nameType) || visitNode(cbNode, (node).questionToken) || visitNode(cbNode, (node).type); case SyntaxKind.LiteralType: @@ -424,6 +425,10 @@ namespace ts { return visitNode(cbNode, (node).head) || visitNodes(cbNode, cbNodes, (node).templateSpans); case SyntaxKind.TemplateSpan: return visitNode(cbNode, (node).expression) || visitNode(cbNode, (node).literal); + case SyntaxKind.TemplateLiteralType: + return visitNode(cbNode, (node).head) || visitNodes(cbNode, cbNodes, (node).templateSpans); + case SyntaxKind.TemplateLiteralTypeSpan: + return visitNode(cbNode, (node).type) || visitNode(cbNode, (node).literal); case SyntaxKind.ComputedPropertyName: return visitNode(cbNode, (node).expression); case SyntaxKind.HeritageClause: @@ -477,6 +482,11 @@ namespace ts { visitNode(cbNode, (node).type); case SyntaxKind.JSDocComment: return visitNodes(cbNode, cbNodes, (node).tags); + case SyntaxKind.JSDocSeeTag: + return visitNode(cbNode, (node as JSDocSeeTag).tagName) || + visitNode(cbNode, (node as JSDocSeeTag).name); + case SyntaxKind.JSDocNameReference: + return visitNode(cbNode, (node as JSDocNameReference).name); case SyntaxKind.JSDocParameterTag: case SyntaxKind.JSDocPropertyTag: return visitNode(cbNode, (node as JSDocTag).tagName) || @@ -604,6 +614,7 @@ namespace ts { } export function createSourceFile(fileName: string, sourceText: string, languageVersion: ScriptTarget, setParentNodes = false, scriptKind?: ScriptKind): SourceFile { + tracing.begin(tracing.Phase.Parse, "createSourceFile", { path: fileName }); performance.mark("beforeParse"); let result: SourceFile; @@ -618,6 +629,7 @@ namespace ts { performance.mark("afterParse"); performance.measure("Parse", "beforeParse", "afterParse"); + tracing.end(); return result; } @@ -2356,7 +2368,7 @@ namespace ts { // Returns true if we should abort parsing. function abortParsingListOrMoveToNextToken(kind: ParsingContext) { - parseErrorAtCurrentToken(parsingContextErrors(kind)); + parsingContextErrors(kind); if (isInSomeParsingContext()) { return true; } @@ -2365,33 +2377,36 @@ namespace ts { return false; } - function parsingContextErrors(context: ParsingContext): DiagnosticMessage { + function parsingContextErrors(context: ParsingContext) { switch (context) { - case ParsingContext.SourceElements: return Diagnostics.Declaration_or_statement_expected; - case ParsingContext.BlockStatements: return Diagnostics.Declaration_or_statement_expected; - case ParsingContext.SwitchClauses: return Diagnostics.case_or_default_expected; - case ParsingContext.SwitchClauseStatements: return Diagnostics.Statement_expected; + case ParsingContext.SourceElements: return parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); + case ParsingContext.BlockStatements: return parseErrorAtCurrentToken(Diagnostics.Declaration_or_statement_expected); + case ParsingContext.SwitchClauses: return parseErrorAtCurrentToken(Diagnostics.case_or_default_expected); + case ParsingContext.SwitchClauseStatements: return parseErrorAtCurrentToken(Diagnostics.Statement_expected); case ParsingContext.RestProperties: // fallthrough - case ParsingContext.TypeMembers: return Diagnostics.Property_or_signature_expected; - case ParsingContext.ClassMembers: return Diagnostics.Unexpected_token_A_constructor_method_accessor_or_property_was_expected; - case ParsingContext.EnumMembers: return Diagnostics.Enum_member_expected; - case ParsingContext.HeritageClauseElement: return Diagnostics.Expression_expected; - case ParsingContext.VariableDeclarations: return Diagnostics.Variable_declaration_expected; - case ParsingContext.ObjectBindingElements: return Diagnostics.Property_destructuring_pattern_expected; - case ParsingContext.ArrayBindingElements: return Diagnostics.Array_element_destructuring_pattern_expected; - case ParsingContext.ArgumentExpressions: return Diagnostics.Argument_expression_expected; - case ParsingContext.ObjectLiteralMembers: return Diagnostics.Property_assignment_expected; - case ParsingContext.ArrayLiteralMembers: return Diagnostics.Expression_or_comma_expected; - case ParsingContext.JSDocParameters: return Diagnostics.Parameter_declaration_expected; - case ParsingContext.Parameters: return Diagnostics.Parameter_declaration_expected; - case ParsingContext.TypeParameters: return Diagnostics.Type_parameter_declaration_expected; - case ParsingContext.TypeArguments: return Diagnostics.Type_argument_expected; - case ParsingContext.TupleElementTypes: return Diagnostics.Type_expected; - case ParsingContext.HeritageClauses: return Diagnostics.Unexpected_token_expected; - case ParsingContext.ImportOrExportSpecifiers: return Diagnostics.Identifier_expected; - case ParsingContext.JsxAttributes: return Diagnostics.Identifier_expected; - case ParsingContext.JsxChildren: return Diagnostics.Identifier_expected; - default: return undefined!; // TODO: GH#18217 `default: Debug.assertNever(context);` + case ParsingContext.TypeMembers: return parseErrorAtCurrentToken(Diagnostics.Property_or_signature_expected); + case ParsingContext.ClassMembers: return parseErrorAtCurrentToken(Diagnostics.Unexpected_token_A_constructor_method_accessor_or_property_was_expected); + case ParsingContext.EnumMembers: return parseErrorAtCurrentToken(Diagnostics.Enum_member_expected); + case ParsingContext.HeritageClauseElement: return parseErrorAtCurrentToken(Diagnostics.Expression_expected); + case ParsingContext.VariableDeclarations: + return isKeyword(token()) + ? parseErrorAtCurrentToken(Diagnostics._0_is_not_allowed_as_a_variable_declaration_name, tokenToString(token())) + : parseErrorAtCurrentToken(Diagnostics.Variable_declaration_expected); + case ParsingContext.ObjectBindingElements: return parseErrorAtCurrentToken(Diagnostics.Property_destructuring_pattern_expected); + case ParsingContext.ArrayBindingElements: return parseErrorAtCurrentToken(Diagnostics.Array_element_destructuring_pattern_expected); + case ParsingContext.ArgumentExpressions: return parseErrorAtCurrentToken(Diagnostics.Argument_expression_expected); + case ParsingContext.ObjectLiteralMembers: return parseErrorAtCurrentToken(Diagnostics.Property_assignment_expected); + case ParsingContext.ArrayLiteralMembers: return parseErrorAtCurrentToken(Diagnostics.Expression_or_comma_expected); + case ParsingContext.JSDocParameters: return parseErrorAtCurrentToken(Diagnostics.Parameter_declaration_expected); + case ParsingContext.Parameters: return parseErrorAtCurrentToken(Diagnostics.Parameter_declaration_expected); + case ParsingContext.TypeParameters: return parseErrorAtCurrentToken(Diagnostics.Type_parameter_declaration_expected); + case ParsingContext.TypeArguments: return parseErrorAtCurrentToken(Diagnostics.Type_argument_expected); + case ParsingContext.TupleElementTypes: return parseErrorAtCurrentToken(Diagnostics.Type_expected); + case ParsingContext.HeritageClauses: return parseErrorAtCurrentToken(Diagnostics.Unexpected_token_expected); + case ParsingContext.ImportOrExportSpecifiers: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); + case ParsingContext.JsxAttributes: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); + case ParsingContext.JsxChildren: return parseErrorAtCurrentToken(Diagnostics.Identifier_expected); + default: return [undefined!]; // TODO: GH#18217 `default: Debug.assertNever(context);` } } @@ -2576,6 +2591,40 @@ namespace ts { ); } + function parseTemplateType(): TemplateLiteralTypeNode { + const pos = getNodePos(); + return finishNode( + factory.createTemplateLiteralType( + parseTemplateHead(/*isTaggedTemplate*/ false), + parseTemplateTypeSpans() + ), + pos + ); + } + + function parseTemplateTypeSpans() { + const pos = getNodePos(); + const list = []; + let node: TemplateLiteralTypeSpan; + do { + node = parseTemplateTypeSpan(); + list.push(node); + } + while (node.literal.kind === SyntaxKind.TemplateMiddle); + return createNodeArray(list, pos); + } + + function parseTemplateTypeSpan(): TemplateLiteralTypeSpan { + const pos = getNodePos(); + return finishNode( + factory.createTemplateLiteralTypeSpan( + parseType(), + parseLiteralOfTemplateSpan(/*isTaggedTemplate*/ false) + ), + pos + ); + } + function parseLiteralOfTemplateSpan(isTaggedTemplate: boolean) { if (token() === SyntaxKind.CloseBraceToken) { reScanTemplateToken(isTaggedTemplate); @@ -3244,6 +3293,7 @@ namespace ts { } parseExpected(SyntaxKind.OpenBracketToken); const typeParameter = parseMappedTypeParameter(); + const nameType = parseOptional(SyntaxKind.AsKeyword) ? parseType() : undefined; parseExpected(SyntaxKind.CloseBracketToken); let questionToken: QuestionToken | PlusToken | MinusToken | undefined; if (token() === SyntaxKind.QuestionToken || token() === SyntaxKind.PlusToken || token() === SyntaxKind.MinusToken) { @@ -3255,7 +3305,7 @@ namespace ts { const type = parseTypeAnnotation(); parseSemicolon(); parseExpected(SyntaxKind.CloseBraceToken); - return finishNode(factory.createMappedTypeNode(readonlyToken, typeParameter, questionToken, type), pos); + return finishNode(factory.createMappedTypeNode(readonlyToken, typeParameter, nameType, questionToken, type), pos); } function parseTupleElementType() { @@ -3436,6 +3486,8 @@ namespace ts { return parseImportType(); case SyntaxKind.AssertsKeyword: return lookAhead(nextTokenIsIdentifierOrKeywordOnSameLine) ? parseAssertsTypePredicate() : parseTypeReference(); + case SyntaxKind.TemplateHead: + return parseTemplateType(); default: return parseTypeReference(); } @@ -3477,6 +3529,8 @@ namespace ts { case SyntaxKind.InferKeyword: case SyntaxKind.ImportKeyword: case SyntaxKind.AssertsKeyword: + case SyntaxKind.NoSubstitutionTemplateLiteral: + case SyntaxKind.TemplateHead: return true; case SyntaxKind.FunctionKeyword: return !inStartOfParameter; @@ -3569,18 +3623,46 @@ namespace ts { return parsePostfixTypeOrHigher(); } + function parseFunctionOrConstructorTypeToError( + isInUnionType: boolean + ): TypeNode | undefined { + // the function type and constructor type shorthand notation + // are not allowed directly in unions and intersections, but we'll + // try to parse them gracefully and issue a helpful message. + if (isStartOfFunctionTypeOrConstructorType()) { + const type = parseFunctionOrConstructorType(); + let diagnostic: DiagnosticMessage; + if (isFunctionTypeNode(type)) { + diagnostic = isInUnionType + ? Diagnostics.Function_type_notation_must_be_parenthesized_when_used_in_a_union_type + : Diagnostics.Function_type_notation_must_be_parenthesized_when_used_in_an_intersection_type; + } + else { + diagnostic = isInUnionType + ? Diagnostics.Constructor_type_notation_must_be_parenthesized_when_used_in_a_union_type + : Diagnostics.Constructor_type_notation_must_be_parenthesized_when_used_in_an_intersection_type; + + } + parseErrorAtRange(type, diagnostic); + return type; + } + return undefined; + } + function parseUnionOrIntersectionType( operator: SyntaxKind.BarToken | SyntaxKind.AmpersandToken, parseConstituentType: () => TypeNode, createTypeNode: (types: NodeArray) => UnionOrIntersectionTypeNode ): TypeNode { const pos = getNodePos(); + const isUnionType = operator === SyntaxKind.BarToken; const hasLeadingOperator = parseOptional(operator); - let type = parseConstituentType(); + let type = hasLeadingOperator && parseFunctionOrConstructorTypeToError(isUnionType) + || parseConstituentType(); if (token() === operator || hasLeadingOperator) { const types = [type]; while (parseOptional(operator)) { - types.push(parseConstituentType()); + types.push(parseFunctionOrConstructorTypeToError(isUnionType) || parseConstituentType()); } type = finishNode(createTypeNode(createNodeArray(types, pos)), pos); } @@ -3595,11 +3677,14 @@ namespace ts { return parseUnionOrIntersectionType(SyntaxKind.BarToken, parseIntersectionTypeOrHigher, factory.createUnionTypeNode); } - function isStartOfFunctionType(): boolean { + function isStartOfFunctionTypeOrConstructorType(): boolean { if (token() === SyntaxKind.LessThanToken) { return true; } - return token() === SyntaxKind.OpenParenToken && lookAhead(isUnambiguouslyStartOfFunctionType); + if (token() === SyntaxKind.OpenParenToken && lookAhead(isUnambiguouslyStartOfFunctionType)) { + return true; + } + return token() === SyntaxKind.NewKeyword; } function skipParameterStart(): boolean { @@ -3684,7 +3769,7 @@ namespace ts { } function parseTypeWorker(noConditionalTypes?: boolean): TypeNode { - if (isStartOfFunctionType() || token() === SyntaxKind.NewKeyword) { + if (isStartOfFunctionTypeOrConstructorType()) { return parseFunctionOrConstructorType(); } const pos = getNodePos(); @@ -6657,7 +6742,7 @@ namespace ts { const name = parseIdentifier(); const typeParameters = parseTypeParameters(); parseExpected(SyntaxKind.EqualsToken); - const type = parseType(); + const type = token() === SyntaxKind.IntrinsicKeyword && tryParse(parseKeywordAndNoDot) || parseType(); parseSemicolon(); const node = factory.createTypeAliasDeclaration(decorators, modifiers, name, typeParameters, type); return withJSDoc(finishNode(node, pos), hasJSDoc); @@ -6965,7 +7050,7 @@ namespace ts { } function parseNamespaceExport(pos: number): NamespaceExport { - return finishNode(factory.createNamespaceExport(parseIdentifier()), pos); + return finishNode(factory.createNamespaceExport(parseIdentifierName()), pos); } function parseExportDeclaration(pos: number, hasJSDoc: boolean, decorators: NodeArray | undefined, modifiers: NodeArray | undefined): ExportDeclaration { @@ -7116,6 +7201,19 @@ namespace ts { return finishNode(result, pos); } + export function parseJSDocNameReference(): JSDocNameReference { + const pos = getNodePos(); + const hasBrace = parseOptional(SyntaxKind.OpenBraceToken); + const entityName = parseEntityName(/* allowReservedWords*/ false); + if (hasBrace) { + parseExpectedJSDoc(SyntaxKind.CloseBraceToken); + } + + const result = factory.createJSDocNameReference(entityName); + fixupParentReferences(result); + return finishNode(result, pos); + } + export function parseIsolatedJSDocComment(content: string, start: number | undefined, length: number | undefined): { jsDoc: JSDoc, diagnostics: Diagnostic[] } | undefined { initializeState("", content, ScriptTarget.Latest, /*_syntaxCursor:*/ undefined, ScriptKind.JS); const jsDoc = doInsideOfContext(NodeFlags.JSDoc, () => parseJSDocCommentWorker(start, length)); @@ -7186,7 +7284,8 @@ namespace ts { let state = JSDocState.SawAsterisk; let margin: number | undefined; // + 4 for leading '/** ' - let indent = start - Math.max(content.lastIndexOf("\n", start), 0) + 4; + // + 1 because the last index of \n is always one index before the first character in the line and coincidentally, if there is no \n before start, it is -1, which is also one index before the first character + let indent = start - (content.lastIndexOf("\n", start) + 1) + 4; function pushComment(text: string) { if (!margin) { margin = indent; @@ -7242,7 +7341,7 @@ namespace ts { comments.push(whitespace); } else if (margin !== undefined && indent + whitespace.length > margin) { - comments.push(whitespace.slice(margin - indent - 1)); + comments.push(whitespace.slice(margin - indent)); } indent += whitespace.length; break; @@ -7396,6 +7495,9 @@ namespace ts { case "callback": tag = parseCallbackTag(start, tagName, margin, indentText); break; + case "see": + tag = parseSeeTag(start, tagName, margin, indentText); + break; default: tag = parseUnknownTag(start, tagName, margin, indentText); break; @@ -7626,6 +7728,13 @@ namespace ts { return finishNode(factory.createJSDocTypeTag(tagName, typeExpression, comments), start, end); } + function parseSeeTag(start: number, tagName: Identifier, indent?: number, indentText?: string): JSDocSeeTag { + const nameExpression = parseJSDocNameReference(); + const end = getNodePos(); + const comments = indent !== undefined && indentText !== undefined ? parseTrailingTagComments(start, end, indent, indentText) : undefined; + return finishNode(factory.createJSDocSeeTag(tagName, nameExpression, comments), start, end); + } + function parseAuthorTag(start: number, tagName: Identifier, indent: number, indentText: string): JSDocAuthorTag { const authorInfoWithEmail = tryParse(() => tryParseAuthorNameAndEmail()); if (!authorInfoWithEmail) { @@ -8761,6 +8870,8 @@ namespace ts { } case "jsx": case "jsxfrag": + case "jsximportsource": + case "jsxruntime": return; // Accessed directly default: Debug.fail("Unhandled pragma kind"); // Can this be made into an assertNever in the future? } diff --git a/src/compiler/path.ts b/src/compiler/path.ts index f377b411b24..d7df5eefb2f 100644 --- a/src/compiler/path.ts +++ b/src/compiler/path.ts @@ -68,6 +68,14 @@ namespace ts { return /^\.\.?($|[\\/])/.test(path); } + /** + * Determines whether a path is neither relative nor absolute, e.g. "path/to/file". + * Also known misleadingly as "non-relative". + */ + export function pathIsBareSpecifier(path: string): boolean { + return !pathIsAbsolute(path) && !pathIsRelative(path); + } + export function hasExtension(fileName: string): boolean { return stringContains(getBaseFileName(fileName), "."); } diff --git a/src/compiler/perfLogger.ts b/src/compiler/perfLogger.ts index 8ed8feac90c..f05e8a3bd10 100644 --- a/src/compiler/perfLogger.ts +++ b/src/compiler/perfLogger.ts @@ -28,9 +28,11 @@ namespace ts { // See https://github.com/microsoft/typescript-etw for more information let etwModule; try { - // require() will throw an exception if the module is not installed + const etwModulePath = process.env.TS_ETW_MODULE_PATH ?? "./node_modules/@microsoft/typescript-etw"; + + // require() will throw an exception if the module is not found // It may also return undefined if not installed properly - etwModule = require("@microsoft/typescript-etw"); + etwModule = require(etwModulePath); } catch (e) { etwModule = undefined; diff --git a/src/compiler/program.ts b/src/compiler/program.ts index 0bfbd381792..76fa4b62aab 100644 --- a/src/compiler/program.ts +++ b/src/compiler/program.ts @@ -702,7 +702,7 @@ namespace ts { let processingDefaultLibFiles: SourceFile[] | undefined; let processingOtherFiles: SourceFile[] | undefined; let files: SourceFile[]; - let symlinks: ReadonlyESMap | undefined; + let symlinks: SymlinkCache | undefined; let commonSourceDirectory: string; let diagnosticsProducingTypeChecker: TypeChecker; let noDiagnosticsTypeChecker: TypeChecker; @@ -734,6 +734,7 @@ namespace ts { // Track source files that are source files found by searching under node_modules, as these shouldn't be compiled. const sourceFilesFoundSearchingNodeModules = new Map(); + tracing.begin(tracing.Phase.Program, "createProgram", {}); performance.mark("beforeProgram"); const host = createProgramOptions.host || createCompilerHost(options); @@ -809,8 +810,9 @@ namespace ts { const useSourceOfProjectReferenceRedirect = !!host.useSourceOfProjectReferenceRedirect?.() && !options.disableSourceOfProjectReferenceRedirect; - const { onProgramCreateComplete, fileExists } = updateHostForUseSourceOfProjectReferenceRedirect({ + const { onProgramCreateComplete, fileExists, directoryExists } = updateHostForUseSourceOfProjectReferenceRedirect({ compilerHost: host, + getSymlinkCache, useSourceOfProjectReferenceRedirect, toPath, getResolvedProjectReferences, @@ -947,6 +949,7 @@ namespace ts { getNodeCount: () => getDiagnosticsProducingTypeChecker().getNodeCount(), getIdentifierCount: () => getDiagnosticsProducingTypeChecker().getIdentifierCount(), getSymbolCount: () => getDiagnosticsProducingTypeChecker().getSymbolCount(), + getTypeCatalog: () => getDiagnosticsProducingTypeChecker().getTypeCatalog(), getTypeCount: () => getDiagnosticsProducingTypeChecker().getTypeCount(), getInstantiationCount: () => getDiagnosticsProducingTypeChecker().getInstantiationCount(), getRelationCacheSizes: () => getDiagnosticsProducingTypeChecker().getRelationCacheSizes(), @@ -971,7 +974,9 @@ namespace ts { isSourceOfProjectReferenceRedirect, emitBuildInfo, fileExists, - getProbableSymlinks, + directoryExists, + getSymlinkCache, + realpath: host.realpath?.bind(host), useCaseSensitiveFileNames: () => host.useCaseSensitiveFileNames(), }; @@ -979,6 +984,7 @@ namespace ts { verifyCompilerOptions(); performance.mark("afterProgram"); performance.measure("Program", "beforeProgram", "afterProgram"); + tracing.end(); return program; @@ -1480,7 +1486,7 @@ namespace ts { getResolvedProjectReferenceToRedirect, getProjectReferenceRedirect, isSourceOfProjectReferenceRedirect, - getProbableSymlinks, + getSymlinkCache, writeFile: writeFileCallback || ( (fileName, data, writeByteOrderMark, onError, sourceFiles) => host.writeFile(fileName, data, writeByteOrderMark, onError, sourceFiles)), isEmitBlocked, @@ -1502,6 +1508,7 @@ namespace ts { function emitBuildInfo(writeFileCallback?: WriteFileCallback): EmitResult { Debug.assert(!outFile(options)); + tracing.begin(tracing.Phase.Emit, "emitBuildInfo", {}); performance.mark("beforeEmit"); const emitResult = emitFiles( notImplementedResolver, @@ -1514,6 +1521,7 @@ namespace ts { performance.mark("afterEmit"); performance.measure("Emit", "beforeEmit", "afterEmit"); + tracing.end(); return emitResult; } @@ -1574,7 +1582,10 @@ namespace ts { } function emit(sourceFile?: SourceFile, writeFileCallback?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, transformers?: CustomTransformers, forceDtsEmit?: boolean): EmitResult { - return runWithCancellationToken(() => emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, transformers, forceDtsEmit)); + tracing.begin(tracing.Phase.Emit, "emit", { path: sourceFile?.path }); + const result = runWithCancellationToken(() => emitWorker(program, sourceFile, writeFileCallback, cancellationToken, emitOnlyDtsFiles, transformers, forceDtsEmit)); + tracing.end(); + return result; } function isEmitBlocked(emitFileName: string): boolean { @@ -1744,13 +1755,13 @@ namespace ts { const bindDiagnostics: readonly Diagnostic[] = includeBindAndCheckDiagnostics ? sourceFile.bindDiagnostics : emptyArray; const checkDiagnostics = includeBindAndCheckDiagnostics ? typeChecker.getDiagnostics(sourceFile, cancellationToken) : emptyArray; - return getMergedBindAndCheckDiagnostics(sourceFile, bindDiagnostics, checkDiagnostics, isCheckJs ? sourceFile.jsDocDiagnostics : undefined); + return getMergedBindAndCheckDiagnostics(sourceFile, includeBindAndCheckDiagnostics, bindDiagnostics, checkDiagnostics, isCheckJs ? sourceFile.jsDocDiagnostics : undefined); }); } - function getMergedBindAndCheckDiagnostics(sourceFile: SourceFile, ...allDiagnostics: (readonly Diagnostic[] | undefined)[]) { + function getMergedBindAndCheckDiagnostics(sourceFile: SourceFile, includeBindAndCheckDiagnostics: boolean, ...allDiagnostics: (readonly Diagnostic[] | undefined)[]) { const flatDiagnostics = flatten(allDiagnostics); - if (!sourceFile.commentDirectives?.length) { + if (!includeBindAndCheckDiagnostics || !sourceFile.commentDirectives?.length) { return flatDiagnostics; } @@ -1851,7 +1862,7 @@ namespace ts { switch (node.kind) { case SyntaxKind.ImportClause: if ((node as ImportClause).isTypeOnly) { - diagnostics.push(createDiagnosticForNode(node.parent, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); + diagnostics.push(createDiagnosticForNode(parent, Diagnostics._0_declarations_can_only_be_used_in_TypeScript_files, "import type")); return "skip"; } break; @@ -2176,7 +2187,7 @@ namespace ts { const r = /import|require/g; while (r.exec(file.text) !== null) { // eslint-disable-line no-null/no-null const node = getNodeAtPosition(file, r.lastIndex); - if (isRequireCall(node, /*checkArgumentIsStringLiteralLike*/ true)) { + if (isJavaScriptFile && isRequireCall(node, /*checkArgumentIsStringLiteralLike*/ true)) { imports = append(imports, node.arguments[0]); } // we have to check the argument list has length of 1. We will still have to process these even though we have parsing error. @@ -2649,7 +2660,7 @@ namespace ts { function processReferencedFiles(file: SourceFile, isDefaultLib: boolean) { forEach(file.referencedFiles, (ref, index) => { - const referencedFileName = resolveTripleslashReference(ref.fileName, file.originalFileName); + const referencedFileName = resolveTripleslashReference(ref.fileName, file.fileName); processSourceFile( referencedFileName, isDefaultLib, @@ -2843,7 +2854,7 @@ namespace ts { && !options.noResolve && i < file.imports.length && !elideImport - && !(isJsFile && !options.allowJs) + && !(isJsFile && !getAllowJSCompilerOption(options)) && (isInJSFile(file.imports[i]) || !(file.imports[i].flags & NodeFlags.JSDoc)); if (elideImport) { @@ -2983,10 +2994,6 @@ namespace ts { } } - if (options.paths && options.baseUrl === undefined) { - createDiagnosticForOptionName(Diagnostics.Option_paths_cannot_be_used_without_specifying_baseUrl_option, "paths"); - } - if (options.composite) { if (options.declaration === false) { createDiagnosticForOptionName(Diagnostics.Composite_projects_may_not_disable_declaration_emit, "declaration"); @@ -3045,6 +3052,9 @@ namespace ts { if (!hasZeroOrOneAsteriskCharacter(subst)) { createDiagnosticForOptionPathKeyValue(key, i, Diagnostics.Substitution_0_in_pattern_1_can_have_at_most_one_Asterisk_character, subst, key); } + if (!options.baseUrl && !pathIsRelative(subst) && !pathIsAbsolute(subst)) { + createDiagnosticForOptionPathKeyValue(key, i, Diagnostics.Non_relative_paths_are_not_allowed_when_baseUrl_is_not_set_Did_you_forget_a_leading_Slash); + } } else { createDiagnosticForOptionPathKeyValue(key, i, Diagnostics.Substitution_0_for_pattern_1_has_incorrect_type_expected_string_got_2, subst, key, typeOfSubst); @@ -3107,7 +3117,8 @@ namespace ts { const firstNonExternalModuleSourceFile = find(files, f => !isExternalModule(f) && !isSourceFileJS(f) && !f.isDeclarationFile && f.scriptKind !== ScriptKind.JSON); if (firstNonExternalModuleSourceFile) { const span = getErrorSpanForNode(firstNonExternalModuleSourceFile, firstNonExternalModuleSourceFile); - programDiagnostics.add(createFileDiagnostic(firstNonExternalModuleSourceFile, span.start, span.length, Diagnostics.All_files_must_be_modules_when_the_isolatedModules_flag_is_provided)); + programDiagnostics.add(createFileDiagnostic(firstNonExternalModuleSourceFile, span.start, span.length, + Diagnostics._0_cannot_be_compiled_under_isolatedModules_because_it_is_considered_a_global_script_file_Add_an_import_export_or_an_empty_export_statement_to_make_it_a_module, getBaseFileName(firstNonExternalModuleSourceFile.fileName))); } } else if (firstNonAmbientExternalModuleSourceFile && languageVersion < ScriptTarget.ES2015 && options.module === ModuleKind.None) { @@ -3127,6 +3138,11 @@ namespace ts { } } + // Without a package name, for multiple files being bundled into a .d.ts file you basically get a file which doesn't wrk + if (outputFile && getEmitDeclarations(options) && getEmitModuleResolutionKind(options) === ModuleResolutionKind.NodeJs && !options.bundledPackageName) { + createDiagnosticForOptionName(Diagnostics.The_bundledPackageName_option_must_be_provided_when_using_outFile_and_node_module_resolution_with_declaration_emit, options.out ? "out" : "outFile"); + } + if (options.resolveJsonModule) { if (getEmitModuleResolutionKind(options) !== ModuleResolutionKind.NodeJs) { createDiagnosticForOptionName(Diagnostics.Option_resolveJsonModule_cannot_be_specified_without_node_module_resolution_strategy, "resolveJsonModule"); @@ -3156,7 +3172,7 @@ namespace ts { createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_when_option_target_is_ES3, "useDefineForClassFields"); } - if (options.checkJs && !options.allowJs) { + if (options.checkJs && !getAllowJSCompilerOption(options)) { programDiagnostics.add(createCompilerDiagnostic(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "checkJs", "allowJs")); } @@ -3179,6 +3195,9 @@ namespace ts { if (options.reactNamespace) { createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_with_option_1, "reactNamespace", "jsxFactory"); } + if (options.jsx === JsxEmit.ReactJSX || options.jsx === JsxEmit.ReactJSXDev) { + createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, "jsxFactory", inverseJsxOptionMap.get("" + options.jsx)); + } if (!parseIsolatedEntityName(options.jsxFactory, languageVersion)) { createOptionValueDiagnostic("jsxFactory", Diagnostics.Invalid_value_for_jsxFactory_0_is_not_a_valid_identifier_or_qualified_name, options.jsxFactory); } @@ -3191,11 +3210,26 @@ namespace ts { if (!options.jsxFactory) { createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_without_specifying_option_1, "jsxFragmentFactory", "jsxFactory"); } + if (options.jsx === JsxEmit.ReactJSX || options.jsx === JsxEmit.ReactJSXDev) { + createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, "jsxFragmentFactory", inverseJsxOptionMap.get("" + options.jsx)); + } if (!parseIsolatedEntityName(options.jsxFragmentFactory, languageVersion)) { createOptionValueDiagnostic("jsxFragmentFactory", Diagnostics.Invalid_value_for_jsxFragmentFactory_0_is_not_a_valid_identifier_or_qualified_name, options.jsxFragmentFactory); } } + if (options.reactNamespace) { + if (options.jsx === JsxEmit.ReactJSX || options.jsx === JsxEmit.ReactJSXDev) { + createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, "reactNamespace", inverseJsxOptionMap.get("" + options.jsx)); + } + } + + if (options.jsxImportSource) { + if (options.jsx === JsxEmit.React) { + createDiagnosticForOptionName(Diagnostics.Option_0_cannot_be_specified_when_option_jsx_is_1, "jsxImportSource", inverseJsxOptionMap.get("" + options.jsx)); + } + } + // If the emit is enabled make sure that every output file is unique and not overwriting any of the input files if (!options.noEmit && !options.suppressOutputPathCheck) { const emitHost = getEmitHost(); @@ -3304,7 +3338,7 @@ namespace ts { }); } - function createDiagnosticForOptionPathKeyValue(key: string, valueIndex: number, message: DiagnosticMessage, arg0: string | number, arg1: string | number, arg2?: string | number) { + function createDiagnosticForOptionPathKeyValue(key: string, valueIndex: number, message: DiagnosticMessage, arg0?: string | number, arg1?: string | number, arg2?: string | number) { let needCompilerDiagnostic = true; const pathsSyntax = getOptionPathsSyntax(); for (const pathProp of pathsSyntax) { @@ -3450,9 +3484,9 @@ namespace ts { return comparePaths(file1, file2, currentDirectory, !host.useCaseSensitiveFileNames()) === Comparison.EqualTo; } - function getProbableSymlinks(): ReadonlyESMap { - if (host.getSymlinks) { - return host.getSymlinks(); + function getSymlinkCache(): SymlinkCache { + if (host.getSymlinkCache) { + return host.getSymlinkCache(); } return symlinks || (symlinks = discoverProbableSymlinks( files, @@ -3461,13 +3495,9 @@ namespace ts { } } - interface SymlinkedDirectory { - real: string; - realPath: Path; - } - interface HostForUseSourceOfProjectReferenceRedirect { compilerHost: CompilerHost; + getSymlinkCache: () => SymlinkCache; useSourceOfProjectReferenceRedirect: boolean; toPath(fileName: string): Path; getResolvedProjectReferences(): readonly (ResolvedProjectReference | undefined)[] | undefined; @@ -3477,9 +3507,6 @@ namespace ts { function updateHostForUseSourceOfProjectReferenceRedirect(host: HostForUseSourceOfProjectReferenceRedirect) { let setOfDeclarationDirectories: Set | undefined; - let symlinkedDirectories: ESMap | undefined; - let symlinkedFiles: ESMap | undefined; - const originalFileExists = host.compilerHost.fileExists; const originalDirectoryExists = host.compilerHost.directoryExists; const originalGetDirectories = host.compilerHost.getDirectories; @@ -3489,11 +3516,12 @@ namespace ts { host.compilerHost.fileExists = fileExists; + let directoryExists; if (originalDirectoryExists) { // This implementation of directoryExists checks if the directory being requested is // directory of .d.ts file for the referenced Project. // If it is it returns true irrespective of whether that directory exists on host - host.compilerHost.directoryExists = path => { + directoryExists = host.compilerHost.directoryExists = path => { if (originalDirectoryExists.call(host.compilerHost, path)) { handleDirectoryCouldBeSymlink(path); return true; @@ -3535,11 +3563,11 @@ namespace ts { // This is something we keep for life time of the host if (originalRealpath) { host.compilerHost.realpath = s => - symlinkedFiles?.get(host.toPath(s)) || + host.getSymlinkCache().getSymlinkedFiles()?.get(host.toPath(s)) || originalRealpath.call(host.compilerHost, s); } - return { onProgramCreateComplete, fileExists }; + return { onProgramCreateComplete, fileExists, directoryExists }; function onProgramCreateComplete() { host.compilerHost.fileExists = originalFileExists; @@ -3585,20 +3613,20 @@ namespace ts { // Because we already watch node_modules, handle symlinks in there if (!originalRealpath || !stringContains(directory, nodeModulesPathPart)) return; - if (!symlinkedDirectories) symlinkedDirectories = new Map(); + const symlinkCache = host.getSymlinkCache(); const directoryPath = ensureTrailingDirectorySeparator(host.toPath(directory)); - if (symlinkedDirectories.has(directoryPath)) return; + if (symlinkCache.getSymlinkedDirectories()?.has(directoryPath)) return; const real = normalizePath(originalRealpath.call(host.compilerHost, directory)); let realPath: Path; if (real === directory || (realPath = ensureTrailingDirectorySeparator(host.toPath(real))) === directoryPath) { // not symlinked - symlinkedDirectories.set(directoryPath, false); + symlinkCache.setSymlinkedDirectory(directoryPath, false); return; } - symlinkedDirectories.set(directoryPath, { + symlinkCache.setSymlinkedDirectory(directoryPath, { real: ensureTrailingDirectorySeparator(real), realPath }); @@ -3612,10 +3640,12 @@ namespace ts { const result = fileOrDirectoryExistsUsingSource(fileOrDirectory); if (result !== undefined) return result; + const symlinkCache = host.getSymlinkCache(); + const symlinkedDirectories = symlinkCache.getSymlinkedDirectories(); if (!symlinkedDirectories) return false; const fileOrDirectoryPath = host.toPath(fileOrDirectory); if (!stringContains(fileOrDirectoryPath, nodeModulesPathPart)) return false; - if (isFile && symlinkedFiles && symlinkedFiles.has(fileOrDirectoryPath)) return true; + if (isFile && symlinkCache.getSymlinkedFiles()?.has(fileOrDirectoryPath)) return true; // If it contains node_modules check if its one of the symlinked path we know of return firstDefinedIterator( @@ -3624,10 +3654,9 @@ namespace ts { if (!symlinkedDirectory || !startsWith(fileOrDirectoryPath, directoryPath)) return undefined; const result = fileOrDirectoryExistsUsingSource(fileOrDirectoryPath.replace(directoryPath, symlinkedDirectory.realPath)); if (isFile && result) { - if (!symlinkedFiles) symlinkedFiles = new Map(); // Store the real path for the file' const absolutePath = getNormalizedAbsolutePath(fileOrDirectory, host.compilerHost.getCurrentDirectory()); - symlinkedFiles.set( + symlinkCache.setSymlinkedFile( fileOrDirectoryPath, `${symlinkedDirectory.real}${absolutePath.replace(new RegExp(directoryPath, "i"), "")}` ); @@ -3775,7 +3804,7 @@ namespace ts { return options.jsx ? undefined : Diagnostics.Module_0_was_resolved_to_1_but_jsx_is_not_set; } function needAllowJs() { - return options.allowJs || !getStrictOptionValue(options, "noImplicitAny") ? undefined : Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type; + return getAllowJSCompilerOption(options) || !getStrictOptionValue(options, "noImplicitAny") ? undefined : Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type; } function needResolveJsonModule() { return options.resolveJsonModule ? undefined : Diagnostics.Module_0_was_resolved_to_1_but_resolveJsonModule_is_not_used; diff --git a/src/compiler/resolutionCache.ts b/src/compiler/resolutionCache.ts index 9e82ab0e137..6848ecb4bc9 100644 --- a/src/compiler/resolutionCache.ts +++ b/src/compiler/resolutionCache.ts @@ -455,7 +455,7 @@ namespace ts { getResolutionWithResolvedFileName: getResolvedModule, shouldRetryResolution: resolution => !resolution.resolvedModule || !resolutionExtensionIsTSOrJson(resolution.resolvedModule.extension), reusedNames, - logChanges: logChangesWhenResolvingModule + logChanges: logChangesWhenResolvingModule, }); } @@ -546,7 +546,7 @@ namespace ts { } else { resolution.refCount = 1; - Debug.assert(resolution.files === undefined); + Debug.assert(length(resolution.files) === 0); // This resolution shouldnt be referenced by any file yet if (isExternalModuleNameRelative(name)) { watchFailedLookupLocationOfResolution(resolution); } @@ -724,7 +724,7 @@ namespace ts { for (const containingFilePath of Debug.assertDefined(resolution.files)) { (filesWithInvalidatedResolutions || (filesWithInvalidatedResolutions = new Set())).add(containingFilePath); // When its a file with inferred types resolution, invalidate type reference directive resolution - hasChangedAutomaticTypeDirectiveNames = hasChangedAutomaticTypeDirectiveNames || containingFilePath.endsWith(inferredTypesContainingFile); + hasChangedAutomaticTypeDirectiveNames = hasChangedAutomaticTypeDirectiveNames || endsWith(containingFilePath, inferredTypesContainingFile); } } return invalidated; diff --git a/src/compiler/scanner.ts b/src/compiler/scanner.ts index 77ec82ffef7..35388e38b04 100644 --- a/src/compiler/scanner.ts +++ b/src/compiler/scanner.ts @@ -111,6 +111,7 @@ namespace ts { infer: SyntaxKind.InferKeyword, instanceof: SyntaxKind.InstanceOfKeyword, interface: SyntaxKind.InterfaceKeyword, + intrinsic: SyntaxKind.IntrinsicKeyword, is: SyntaxKind.IsKeyword, keyof: SyntaxKind.KeyOfKeyword, let: SyntaxKind.LetKeyword, @@ -1508,9 +1509,9 @@ namespace ts { } function getIdentifierToken(): SyntaxKind.Identifier | KeywordSyntaxKind { - // Reserved words are between 2 and 11 characters long and start with a lowercase letter + // Reserved words are between 2 and 12 characters long and start with a lowercase letter const len = tokenValue.length; - if (len >= 2 && len <= 11) { + if (len >= 2 && len <= 12) { const ch = tokenValue.charCodeAt(0); if (ch >= CharacterCodes.a && ch <= CharacterCodes.z) { const keyword = textToKeyword.get(tokenValue); diff --git a/src/compiler/semver.ts b/src/compiler/semver.ts index 1c77d24d072..8827962deaf 100644 --- a/src/compiler/semver.ts +++ b/src/compiler/semver.ts @@ -84,7 +84,7 @@ namespace ts { return compareValues(this.major, other.major) || compareValues(this.minor, other.minor) || compareValues(this.patch, other.patch) - || comparePrerelaseIdentifiers(this.prerelease, other.prerelease); + || comparePrereleaseIdentifiers(this.prerelease, other.prerelease); } increment(field: "major" | "minor" | "patch") { @@ -120,7 +120,7 @@ namespace ts { }; } - function comparePrerelaseIdentifiers(left: readonly string[], right: readonly string[]) { + function comparePrereleaseIdentifiers(left: readonly string[], right: readonly string[]) { // https://semver.org/#spec-item-11 // > When major, minor, and patch are equal, a pre-release version has lower precedence // > than a normal version. @@ -388,4 +388,4 @@ namespace ts { function formatComparator(comparator: Comparator) { return `${comparator.operator}${comparator.operand}`; } -} \ No newline at end of file +} diff --git a/src/compiler/sys.ts b/src/compiler/sys.ts index 1662a7ef310..efa51678f4d 100644 --- a/src/compiler/sys.ts +++ b/src/compiler/sys.ts @@ -1662,6 +1662,11 @@ namespace ts { } function fileSystemEntryExists(path: string, entryKind: FileSystemEntryKind): boolean { + // Since the error thrown by fs.statSync isn't used, we can avoid collecting a stack trace to improve + // the CPU time performance. + const originalStackTraceLimit = Error.stackTraceLimit; + Error.stackTraceLimit = 0; + try { const stat = _fs.statSync(path); switch (entryKind) { @@ -1673,6 +1678,9 @@ namespace ts { catch (e) { return false; } + finally { + Error.stackTraceLimit = originalStackTraceLimit; + } } function fileExists(path: string): boolean { diff --git a/src/compiler/tracing.ts b/src/compiler/tracing.ts new file mode 100644 index 00000000000..30b90a2b0d1 --- /dev/null +++ b/src/compiler/tracing.ts @@ -0,0 +1,256 @@ +/*@internal*/ +/** Tracing events for the compiler. */ +namespace ts.tracing { + let fs: typeof import("fs") | false | undefined; + + let traceCount = 0; + let traceFd: number | undefined; + + let legendPath: string | undefined; + const legend: TraceRecord[] = []; + + /** Starts tracing for the given project (unless the `fs` module is unavailable). */ + export function startTracing(configFilePath: string | undefined, traceDir: string, isBuildMode: boolean) { + Debug.assert(!traceFd, "Tracing already started"); + + if (fs === undefined) { + try { + fs = require("fs"); + } + catch { + fs = false; + } + } + + if (!fs) { + return; + } + + if (legendPath === undefined) { + legendPath = combinePaths(traceDir, "legend.json"); + } + + // Note that writing will fail later on if it exists and is not a directory + if (!fs.existsSync(traceDir)) { + fs.mkdirSync(traceDir, { recursive: true }); + } + + const countPart = isBuildMode ? `.${++traceCount}` : ``; + const tracePath = combinePaths(traceDir, `trace${countPart}.json`); + const typesPath = combinePaths(traceDir, `types${countPart}.json`); + + legend.push({ + configFilePath, + tracePath, + typesPath, + }); + + traceFd = fs.openSync(tracePath, "w"); + fs.writeSync(traceFd, `[\n`); + } + + /** Stops tracing for the in-progress project and dumps the type catalog (unless the `fs` module is unavailable). */ + export function stopTracing(typeCatalog: readonly Type[]) { + if (!traceFd) { + Debug.assert(!fs, "Tracing is not in progress"); + return; + } + + Debug.assert(fs); + + // This both indicates that the trace is untruncated and conveniently + // ensures that the last array element won't have a trailing comma. + fs.writeSync(traceFd, `{"pid":1,"tid":1,"ph":"i","ts":${1000 * timestamp()},"name":"done","s":"g"}\n`); + fs.writeSync(traceFd, `]\n`); + + fs.closeSync(traceFd); + traceFd = undefined; + + if (typeCatalog) { + dumpTypes(typeCatalog); + } + else { + // We pre-computed this path for convenience, but clear it + // now that the file won't be created. + legend[legend.length - 1].typesPath = undefined; + } + } + + export function isTracing() { + return !!traceFd; + } + + export const enum Phase { + Parse = "parse", + Program = "program", + Bind = "bind", + Check = "check", + Emit = "emit", + } + + export function begin(phase: Phase, name: string, args: object) { + if (!traceFd) { + return; + } + Debug.assert(fs); + + performance.mark("beginTracing"); + fs.writeSync(traceFd, `{"pid":1,"tid":1,"ph":"B","cat":"${phase}","ts":${1000 * timestamp()},"name":"${name}","args":{ "ts": ${JSON.stringify(args)} }},\n`); + performance.mark("endTracing"); + performance.measure("Tracing", "beginTracing", "endTracing"); + } + + export function end() { + if (!traceFd) { + return; + } + Debug.assert(fs); + + performance.mark("beginTracing"); + fs.writeSync(traceFd, `{"pid":1,"tid":1,"ph":"E","ts":${1000 * timestamp()}},\n`); + performance.mark("endTracing"); + performance.measure("Tracing", "beginTracing", "endTracing"); + } + + export function instant(phase: Phase, name: string, args: object) { + if (!traceFd) { + return; + } + Debug.assert(fs); + + performance.mark("beginTracing"); + fs.writeSync(traceFd, `{"pid":1,"tid":1,"ph":"i","cat":"${phase}","ts":${1000 * timestamp()},"name":"${name}","s":"g","args":{ "ts": ${JSON.stringify(args)} }},\n`); + performance.mark("endTracing"); + performance.measure("Tracing", "beginTracing", "endTracing"); + } + + function indexFromOne(lc: LineAndCharacter): LineAndCharacter { + return { + line: lc.line + 1, + character: lc.character + 1, + }; + } + + function dumpTypes(types: readonly Type[]) { + Debug.assert(fs); + + performance.mark("beginDumpTypes"); + + const typesPath = legend[legend.length - 1].typesPath!; + const typesFd = fs.openSync(typesPath, "w"); + + const recursionIdentityMap = new Map(); + + // Cleverness: no line break here so that the type ID will match the line number + fs.writeSync(typesFd, "["); + + const numTypes = types.length; + for (let i = 0; i < numTypes; i++) { + const type = types[i]; + const objectFlags = (type as any).objectFlags; + const symbol = type.aliasSymbol ?? type.symbol; + const firstDeclaration = symbol?.declarations?.[0]; + const firstFile = firstDeclaration && getSourceFileOfNode(firstDeclaration); + + // It's slow to compute the display text, so skip it unless it's really valuable (or cheap) + let display: string | undefined; + if ((objectFlags & ObjectFlags.Anonymous) | (type.flags & TypeFlags.Literal)) { + try { + display = type.checker?.typeToString(type); + } + catch { + display = undefined; + } + } + + let indexedAccessProperties: object = {}; + if (type.flags & TypeFlags.IndexedAccess) { + const indexedAccessType = type as IndexedAccessType; + indexedAccessProperties = { + indexedAccessObjectType: indexedAccessType.objectType?.id, + indexedAccessIndexType: indexedAccessType.indexType?.id, + }; + } + + let referenceProperties: object = {}; + if (objectFlags & ObjectFlags.Reference) { + const referenceType = type as TypeReference; + referenceProperties = { + instantiatedType: referenceType.target?.id, + typeArguments: referenceType.resolvedTypeArguments?.map(t => t.id), + }; + } + + let conditionalProperties: object = {}; + if (type.flags & TypeFlags.Conditional) { + const conditionalType = type as ConditionalType; + conditionalProperties = { + conditionalCheckType: conditionalType.checkType?.id, + conditionalExtendsType: conditionalType.extendsType?.id, + conditionalTrueType: conditionalType.resolvedTrueType?.id ?? -1, + conditionalFalseType: conditionalType.resolvedFalseType?.id ?? -1, + }; + } + + // We can't print out an arbitrary object, so just assign each one a unique number. + // Don't call it an "id" so people don't treat it as a type id. + let recursionToken: number | undefined; + const recursionIdentity = type.checker.getRecursionIdentity(type); + if (recursionIdentity) { + recursionToken = recursionIdentityMap.get(recursionIdentity); + if (!recursionToken) { + recursionToken = recursionIdentityMap.size; + recursionIdentityMap.set(recursionIdentity, recursionToken); + } + } + + const descriptor = { + id: type.id, + intrinsicName: (type as any).intrinsicName, + symbolName: symbol?.escapedName && unescapeLeadingUnderscores(symbol.escapedName), + recursionId: recursionToken, + unionTypes: (type.flags & TypeFlags.Union) ? (type as UnionType).types?.map(t => t.id) : undefined, + intersectionTypes: (type.flags & TypeFlags.Intersection) ? (type as IntersectionType).types.map(t => t.id) : undefined, + aliasTypeArguments: type.aliasTypeArguments?.map(t => t.id), + keyofType: (type.flags & TypeFlags.Index) ? (type as IndexType).type?.id : undefined, + ...indexedAccessProperties, + ...referenceProperties, + ...conditionalProperties, + firstDeclaration: firstDeclaration && { + path: firstFile.path, + start: indexFromOne(getLineAndCharacterOfPosition(firstFile, firstDeclaration.pos)), + end: indexFromOne(getLineAndCharacterOfPosition(getSourceFileOfNode(firstDeclaration), firstDeclaration.end)), + }, + flags: Debug.formatTypeFlags(type.flags).split("|"), + display, + }; + + fs.writeSync(typesFd, JSON.stringify(descriptor)); + if (i < numTypes - 1) { + fs.writeSync(typesFd, ",\n"); + } + } + + fs.writeSync(typesFd, "]\n"); + + fs.closeSync(typesFd); + + performance.mark("endDumpTypes"); + performance.measure("Dump types", "beginDumpTypes", "endDumpTypes"); + } + + export function dumpLegend() { + if (!legendPath) { + return; + } + Debug.assert(fs); + + fs.writeFileSync(legendPath, JSON.stringify(legend)); + } + + interface TraceRecord { + configFilePath?: string; + tracePath: string; + typesPath?: string; + } +} diff --git a/src/compiler/transformer.ts b/src/compiler/transformer.ts index 2ed0e6ad931..f76652df95e 100644 --- a/src/compiler/transformer.ts +++ b/src/compiler/transformer.ts @@ -37,7 +37,6 @@ namespace ts { function getScriptTransformers(compilerOptions: CompilerOptions, customTransformers?: CustomTransformers, emitOnlyDtsFiles?: boolean) { if (emitOnlyDtsFiles) return emptyArray; - const jsx = compilerOptions.jsx; const languageVersion = getEmitScriptTarget(compilerOptions); const moduleKind = getEmitModuleKind(compilerOptions); const transformers: TransformerFactory[] = []; @@ -47,7 +46,7 @@ namespace ts { transformers.push(transformTypeScript); transformers.push(transformClassFields); - if (jsx === JsxEmit.React) { + if (getJSXTransformEnabled(compilerOptions)) { transformers.push(transformJsx); } @@ -222,7 +221,12 @@ namespace ts { state = TransformationState.Initialized; // Transform each node. - const transformed = map(nodes, allowDtsFiles ? transformation : transformRoot); + const transformed: T[] = []; + for (const node of nodes) { + tracing.begin(tracing.Phase.Emit, "transformNodes", node.kind === SyntaxKind.SourceFile ? { path: (node as any as SourceFile).path } : { kind: node.kind, pos: node.pos, end: node.end }); + transformed.push((allowDtsFiles ? transformation : transformRoot)(node)); + tracing.end(); + } // prevent modification of the lexical environment. state = TransformationState.Completed; diff --git a/src/compiler/transformers/declarations.ts b/src/compiler/transformers/declarations.ts index 477ccef9437..af12fbe1925 100644 --- a/src/compiler/transformers/declarations.ts +++ b/src/compiler/transformers/declarations.ts @@ -73,6 +73,7 @@ namespace ts { reportCyclicStructureError, reportPrivateInBaseOfClassExpression, reportLikelyUnsafeImportRequiredError, + reportTruncationError, moduleResolverHost: host, trackReferencedAmbientModule, trackExternalModuleSymbolOfImportTypeNode, @@ -197,6 +198,12 @@ namespace ts { } } + function reportTruncationError() { + if (errorNameNode) { + context.addDiagnostic(createDiagnosticForNode(errorNameNode, Diagnostics.The_inferred_type_of_this_node_exceeds_the_maximum_length_the_compiler_will_serialize_An_explicit_type_annotation_is_needed)); + } + } + function reportNonlocalAugmentation(containingFile: SourceFile, parentSymbol: Symbol, symbol: Symbol) { const primaryDeclaration = find(parentSymbol.declarations, d => getSourceFileOfNode(d) === containingFile)!; const augmentingDeclarations = filter(symbol.declarations, d => getSourceFileOfNode(d) !== containingFile); diff --git a/src/compiler/transformers/declarations/diagnostics.ts b/src/compiler/transformers/declarations/diagnostics.ts index 1294739ef96..ebb453ee83d 100644 --- a/src/compiler/transformers/declarations/diagnostics.ts +++ b/src/compiler/transformers/declarations/diagnostics.ts @@ -447,11 +447,12 @@ namespace ts { function getHeritageClauseVisibilityError(): SymbolAccessibilityDiagnostic { let diagnosticMessage: DiagnosticMessage; // Heritage clause is written by user so it can always be named - if (node.parent.parent.kind === SyntaxKind.ClassDeclaration) { + if (isClassDeclaration(node.parent.parent)) { // Class or Interface implemented/extended is inaccessible diagnosticMessage = isHeritageClause(node.parent) && node.parent.token === SyntaxKind.ImplementsKeyword ? Diagnostics.Implements_clause_of_exported_class_0_has_or_is_using_private_name_1 : - Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1; + node.parent.parent.name ? Diagnostics.extends_clause_of_exported_class_0_has_or_is_using_private_name_1 : + Diagnostics.extends_clause_of_exported_class_has_or_is_using_private_name_0; } else { // interface is inaccessible diff --git a/src/compiler/transformers/es2015.ts b/src/compiler/transformers/es2015.ts index 02ff2c261e5..813ce25672b 100644 --- a/src/compiler/transformers/es2015.ts +++ b/src/compiler/transformers/es2015.ts @@ -814,18 +814,19 @@ namespace ts { */ function transformClassBody(node: ClassExpression | ClassDeclaration, extendsClauseElement: ExpressionWithTypeArguments | undefined): Block { const statements: Statement[] = []; + const name = factory.getInternalName(node); + const constructorLikeName = isIdentifierANonContextualKeyword(name) ? factory.getGeneratedNameForNode(name) : name; startLexicalEnvironment(); addExtendsHelperIfNeeded(statements, node, extendsClauseElement); - addConstructor(statements, node, extendsClauseElement); + addConstructor(statements, node, constructorLikeName, extendsClauseElement); addClassMembers(statements, node); // Create a synthetic text range for the return statement. const closingBraceLocation = createTokenRange(skipTrivia(currentText, node.members.end), SyntaxKind.CloseBraceToken); - const localName = factory.getInternalName(node); // The following partially-emitted expression exists purely to align our sourcemap // emit with the original emitter. - const outer = factory.createPartiallyEmittedExpression(localName); + const outer = factory.createPartiallyEmittedExpression(constructorLikeName); setTextRangeEnd(outer, closingBraceLocation.end); setEmitFlags(outer, EmitFlags.NoComments); @@ -868,7 +869,7 @@ namespace ts { * @param node The ClassExpression or ClassDeclaration node. * @param extendsClauseElement The expression for the class `extends` clause. */ - function addConstructor(statements: Statement[], node: ClassExpression | ClassDeclaration, extendsClauseElement: ExpressionWithTypeArguments | undefined): void { + function addConstructor(statements: Statement[], node: ClassExpression | ClassDeclaration, name: Identifier, extendsClauseElement: ExpressionWithTypeArguments | undefined): void { const savedConvertedLoopState = convertedLoopState; convertedLoopState = undefined; const ancestorFacts = enterSubtree(HierarchyFacts.ConstructorExcludes, HierarchyFacts.ConstructorIncludes); @@ -878,7 +879,7 @@ namespace ts { /*decorators*/ undefined, /*modifiers*/ undefined, /*asteriskToken*/ undefined, - factory.getInternalName(node), + name, /*typeParameters*/ undefined, transformConstructorParameters(constructor, hasSynthesizedSuper), /*type*/ undefined, diff --git a/src/compiler/transformers/jsx.ts b/src/compiler/transformers/jsx.ts index d399408fbe4..544275c6d20 100644 --- a/src/compiler/transformers/jsx.ts +++ b/src/compiler/transformers/jsx.ts @@ -1,15 +1,59 @@ /*@internal*/ namespace ts { export function transformJsx(context: TransformationContext) { + interface PerFileState { + importSpecifier?: string; + filenameDeclaration?: VariableDeclaration & { name: Identifier; }; + utilizedImplicitRuntimeImports?: Map; + } + const { factory, getEmitHelperFactory: emitHelpers, } = context; const compilerOptions = context.getCompilerOptions(); let currentSourceFile: SourceFile; + let currentFileState!: PerFileState; return chainBundle(context, transformSourceFile); + function getCurrentFileNameExpression(): Identifier { + if (currentFileState.filenameDeclaration) { + return currentFileState.filenameDeclaration.name; + } + const declaration = factory.createVariableDeclaration(factory.createUniqueName("_jsxFileName", GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel), /*exclaimationToken*/ undefined, /*type*/ undefined, factory.createStringLiteral(currentSourceFile.fileName)); + currentFileState.filenameDeclaration = declaration as VariableDeclaration & { name: Identifier }; + return currentFileState.filenameDeclaration.name; + } + + function getJsxFactoryCalleePrimitive(children: readonly JsxChild[] | undefined): "jsx" | "jsxs" | "jsxDEV" { + return compilerOptions.jsx === JsxEmit.ReactJSXDev ? "jsxDEV" : children && children.length > 1 ? "jsxs" : "jsx"; + } + + function getJsxFactoryCallee(children: readonly JsxChild[] | undefined) { + const type = getJsxFactoryCalleePrimitive(children); + return getImplicitImportForName(type); + } + + function getImplicitJsxFragmentReference() { + return getImplicitImportForName("Fragment"); + } + + function getImplicitImportForName(name: string) { + const existing = currentFileState.utilizedImplicitRuntimeImports?.get(name); + if (existing) { + return existing.name; + } + if (!currentFileState.utilizedImplicitRuntimeImports) { + currentFileState.utilizedImplicitRuntimeImports = createMap(); + } + const generatedName = factory.createUniqueName(`_${name}`, GeneratedIdentifierFlags.Optimistic | GeneratedIdentifierFlags.FileLevel | GeneratedIdentifierFlags.AllowNameSubstitution); + const specifier = factory.createImportSpecifier(factory.createIdentifier(name), generatedName); + generatedName.generatedImportReference = specifier; + currentFileState.utilizedImplicitRuntimeImports.set(name, specifier); + return generatedName; + } + /** * Transform JSX-specific syntax in a SourceFile. * @@ -21,8 +65,43 @@ namespace ts { } currentSourceFile = node; - const visited = visitEachChild(node, visitor, context); + currentFileState = {}; + currentFileState.importSpecifier = getJSXImplicitImportBase(compilerOptions, node); + let visited = visitEachChild(node, visitor, context); addEmitHelpers(visited, context.readEmitHelpers()); + let statements: readonly Statement[] = visited.statements; + if (currentFileState.filenameDeclaration) { + statements = insertStatementAfterCustomPrologue(statements.slice(), factory.createVariableStatement(/*modifiers*/ undefined, factory.createVariableDeclarationList([currentFileState.filenameDeclaration], NodeFlags.Const))); + } + if (currentFileState.utilizedImplicitRuntimeImports && currentFileState.utilizedImplicitRuntimeImports.size && currentFileState.importSpecifier !== undefined) { + const specifier = `${currentFileState.importSpecifier}/${compilerOptions.jsx === JsxEmit.ReactJSXDev ? "jsx-dev-runtime" : "jsx-runtime"}`; + if (isExternalModule(node)) { + // Add `import` statement + const importStatement = factory.createImportDeclaration(/*decorators*/ undefined, /*modifiers*/ undefined, factory.createImportClause(/*typeOnly*/ false, /*name*/ undefined, factory.createNamedImports(arrayFrom(currentFileState.utilizedImplicitRuntimeImports.values()))), factory.createStringLiteral(specifier)); + setParentRecursive(importStatement, /*incremental*/ false); + statements = insertStatementAfterCustomPrologue(statements.slice(), importStatement); + } + else if (isExternalOrCommonJsModule(node)) { + // Add `require` statement + const requireStatement = factory.createVariableStatement(/*modifiers*/ undefined, factory.createVariableDeclarationList([ + factory.createVariableDeclaration( + factory.createObjectBindingPattern(map(arrayFrom(currentFileState.utilizedImplicitRuntimeImports.values()), s => factory.createBindingElement(/*dotdotdot*/ undefined, s.propertyName, s.name))), + /*exclaimationToken*/ undefined, + /*type*/ undefined, + factory.createCallExpression(factory.createIdentifier("require"), /*typeArguments*/ undefined, [factory.createStringLiteral(specifier)]) + ) + ], NodeFlags.Const)); + setParentRecursive(requireStatement, /*incremental*/ false); + statements = insertStatementAfterCustomPrologue(statements.slice(), requireStatement); + } + else { + // Do nothing (script file) - consider an error in the checker? + } + } + if (statements !== visited.statements) { + visited = factory.updateSourceFile(visited, statements); + } + currentFileState = undefined!; return visited; } @@ -76,19 +155,125 @@ namespace ts { } } + /** + * The react jsx/jsxs transform falls back to `createElement` when an explicit `key` argument comes after a spread + */ + function hasKeyAfterPropsSpread(node: JsxOpeningLikeElement) { + let spread = false; + for (const elem of node.attributes.properties) { + if (isJsxSpreadAttribute(elem)) { + spread = true; + } + else if (spread && isJsxAttribute(elem) && elem.name.escapedText === "key") { + return true; + } + } + return false; + } + + function shouldUseCreateElement(node: JsxOpeningLikeElement) { + return currentFileState.importSpecifier === undefined || hasKeyAfterPropsSpread(node); + } + function visitJsxElement(node: JsxElement, isChild: boolean) { - return visitJsxOpeningLikeElement(node.openingElement, node.children, isChild, /*location*/ node); + const tagTransform = shouldUseCreateElement(node.openingElement) ? visitJsxOpeningLikeElementCreateElement : visitJsxOpeningLikeElementJSX; + return tagTransform(node.openingElement, node.children, isChild, /*location*/ node); } function visitJsxSelfClosingElement(node: JsxSelfClosingElement, isChild: boolean) { - return visitJsxOpeningLikeElement(node, /*children*/ undefined, isChild, /*location*/ node); + const tagTransform = shouldUseCreateElement(node) ? visitJsxOpeningLikeElementCreateElement : visitJsxOpeningLikeElementJSX; + return tagTransform(node, /*children*/ undefined, isChild, /*location*/ node); } function visitJsxFragment(node: JsxFragment, isChild: boolean) { - return visitJsxOpeningFragment(node.openingFragment, node.children, isChild, /*location*/ node); + const tagTransform = currentFileState.importSpecifier === undefined ? visitJsxOpeningFragmentCreateElement : visitJsxOpeningFragmentJSX; + return tagTransform(node.openingFragment, node.children, isChild, /*location*/ node); } - function visitJsxOpeningLikeElement(node: JsxOpeningLikeElement, children: readonly JsxChild[] | undefined, isChild: boolean, location: TextRange) { + function convertJsxChildrenToChildrenPropObject(children: readonly JsxChild[]) { + if (children.length === 1) { + const result = transformJsxChildToExpression(children[0]); + return result && factory.createObjectLiteralExpression([ + factory.createPropertyAssignment("children", result) + ]); + } + const result = mapDefined(children, transformJsxChildToExpression); + return !result.length ? undefined : factory.createObjectLiteralExpression([ + factory.createPropertyAssignment("children", factory.createArrayLiteralExpression(result)) + ]); + } + + function visitJsxOpeningLikeElementJSX(node: JsxOpeningLikeElement, children: readonly JsxChild[] | undefined, isChild: boolean, location: TextRange) { + const tagName = getTagName(node); + let objectProperties: Expression; + const keyAttr = find(node.attributes.properties, p => !!p.name && isIdentifier(p.name) && p.name.escapedText === "key") as JsxAttribute | undefined; + const attrs = keyAttr ? filter(node.attributes.properties, p => p !== keyAttr) : node.attributes.properties; + + let segments: Expression[] = []; + if (attrs.length) { + // Map spans of JsxAttribute nodes into object literals and spans + // of JsxSpreadAttribute nodes into expressions. + segments = flatten( + spanMap(attrs, isJsxSpreadAttribute, (attrs, isSpread) => isSpread + ? map(attrs, transformJsxSpreadAttributeToExpression) + : factory.createObjectLiteralExpression(map(attrs, transformJsxAttributeToObjectLiteralElement)) + ) + ); + + if (isJsxSpreadAttribute(attrs[0])) { + // We must always emit at least one object literal before a spread + // argument.factory.createObjectLiteral + segments.unshift(factory.createObjectLiteralExpression()); + } + } + if (children && children.length) { + const result = convertJsxChildrenToChildrenPropObject(children); + if (result) { + segments.push(result); + } + } + + if (segments.length === 0) { + objectProperties = factory.createObjectLiteralExpression([]); + // When there are no attributes, React wants {} + } + else { + // Either emit one big object literal (no spread attribs), or + // a call to the __assign helper. + objectProperties = singleOrUndefined(segments) || emitHelpers().createAssignHelper(segments); + } + + return visitJsxOpeningLikeElementOrFragmentJSX(tagName, objectProperties, keyAttr, children, isChild, location); + } + + function visitJsxOpeningLikeElementOrFragmentJSX(tagName: Expression, objectProperties: Expression, keyAttr: JsxAttribute | undefined, children: readonly JsxChild[] | undefined, isChild: boolean, location: TextRange) { + const args: Expression[] = [tagName, objectProperties, !keyAttr ? factory.createVoidZero() : transformJsxAttributeInitializer(keyAttr.initializer)]; + if (compilerOptions.jsx === JsxEmit.ReactJSXDev) { + const originalFile = getOriginalNode(currentSourceFile); + if (originalFile && isSourceFile(originalFile)) { + // isStaticChildren development flag + args.push(children && children.length > 1 ? factory.createTrue() : factory.createFalse()); + // __source development flag + const lineCol = getLineAndCharacterOfPosition(originalFile, location.pos); + args.push(factory.createObjectLiteralExpression([ + factory.createPropertyAssignment("fileName", getCurrentFileNameExpression()), + factory.createPropertyAssignment("lineNumber", factory.createNumericLiteral(lineCol.line + 1)), + factory.createPropertyAssignment("columnNumber", factory.createNumericLiteral(lineCol.character + 1)) + ])); + // __self development flag + args.push(factory.createThis()); + } + } + const element = setTextRange(factory.createCallExpression(getJsxFactoryCallee(children), /*typeArguments*/ undefined, args), location); + + if (isChild) { + startOnNewLine(element); + } + + return element; + } + + function visitJsxOpeningLikeElementCreateElement(node: JsxOpeningLikeElement, children: readonly JsxChild[] | undefined, isChild: boolean, location: TextRange) { const tagName = getTagName(node); let objectProperties: Expression | undefined; const attrs = node.attributes.properties; @@ -138,7 +323,25 @@ namespace ts { return element; } - function visitJsxOpeningFragment(node: JsxOpeningFragment, children: readonly JsxChild[], isChild: boolean, location: TextRange) { + function visitJsxOpeningFragmentJSX(_node: JsxOpeningFragment, children: readonly JsxChild[], isChild: boolean, location: TextRange) { + let childrenProps: Expression | undefined; + if (children && children.length) { + const result = convertJsxChildrenToChildrenPropObject(children); + if (result) { + childrenProps = result; + } + } + return visitJsxOpeningLikeElementOrFragmentJSX( + getImplicitJsxFragmentReference(), + childrenProps || factory.createObjectLiteralExpression([]), + /*keyAttr*/ undefined, + children, + isChild, + location + ); + } + + function visitJsxOpeningFragmentCreateElement(node: JsxOpeningFragment, children: readonly JsxChild[], isChild: boolean, location: TextRange) { const element = createExpressionForJsxFragment( factory, context.getEmitResolver().getJsxFactoryEntity(currentSourceFile), diff --git a/src/compiler/transformers/module/esnextAnd2015.ts b/src/compiler/transformers/module/esnextAnd2015.ts index 2d0ee26ebce..24fd849e52b 100644 --- a/src/compiler/transformers/module/esnextAnd2015.ts +++ b/src/compiler/transformers/module/esnextAnd2015.ts @@ -99,7 +99,7 @@ namespace ts { ); setOriginalNode(importDecl, node.exportClause); - const exportDecl = factory.createExportDeclaration( + const exportDecl = isExportNamespaceAsDefaultDeclaration(node) ? factory.createExportDefault(synthName) : factory.createExportDeclaration( /*decorators*/ undefined, /*modifiers*/ undefined, /*isTypeOnly*/ false, diff --git a/src/compiler/transformers/module/module.ts b/src/compiler/transformers/module/module.ts index 49c90482a6b..b3053f7b137 100644 --- a/src/compiler/transformers/module/module.ts +++ b/src/compiler/transformers/module/module.ts @@ -99,7 +99,19 @@ namespace ts { append(statements, createUnderscoreUnderscoreESModule()); } if (length(currentModuleInfo.exportedNames)) { - append(statements, factory.createExpressionStatement(reduceLeft(currentModuleInfo.exportedNames, (prev, nextId) => factory.createAssignment(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), factory.createIdentifier(idText(nextId))), prev), factory.createVoidZero() as Expression))); + const chunkSize = 50; + for (let i=0; i factory.createAssignment(factory.createPropertyAccessExpression(factory.createIdentifier("exports"), factory.createIdentifier(idText(nextId))), prev), + factory.createVoidZero() as Expression + ) + ) + ); + } } append(statements, visitNode(currentModuleInfo.externalHelpersImportDeclaration, sourceElementVisitor, isStatement)); @@ -1043,6 +1055,7 @@ namespace ts { else if (node.exportClause) { const statements: Statement[] = []; // export * as ns from "mod"; + // export * as default from "mod"; statements.push( setOriginalNode( setTextRange( @@ -1051,7 +1064,8 @@ namespace ts { factory.cloneNode(node.exportClause.name), getHelperExpressionForExport(node, moduleKind !== ModuleKind.AMD ? createRequireCall(node) : - factory.createIdentifier(idText(node.exportClause.name))) + isExportNamespaceAsDefaultDeclaration(node) ? generatedName : + factory.createIdentifier(idText(node.exportClause.name))) ) ), node @@ -1195,6 +1209,7 @@ namespace ts { if (hasSyntacticModifier(node, ModifierFlags.Export)) { let modifiers: NodeArray | undefined; + let removeCommentsOnExpressions = false; // If we're exporting these variables, then these just become assignments to 'exports.x'. for (const variable of node.declarationList.declarations) { @@ -1206,7 +1221,31 @@ namespace ts { variables = append(variables, variable); } else if (variable.initializer) { - expressions = append(expressions, transformInitializedVariable(variable as InitializedVariableDeclaration)); + if (!isBindingPattern(variable.name) && (isArrowFunction(variable.initializer) || isFunctionExpression(variable.initializer) || isClassExpression(variable.initializer))) { + const expression = factory.createAssignment( + setTextRange( + factory.createPropertyAccessExpression( + factory.createIdentifier("exports"), + variable.name + ), + /*location*/ variable.name + ), + factory.createIdentifier(getTextOfIdentifierOrLiteral(variable.name)) + ); + const updatedVariable = factory.createVariableDeclaration( + variable.name, + variable.exclamationToken, + variable.type, + visitNode(variable.initializer, moduleExpressionElementVisitor) + ); + + variables = append(variables, updatedVariable); + expressions = append(expressions, expression); + removeCommentsOnExpressions = true; + } + else { + expressions = append(expressions, transformInitializedVariable(variable as InitializedVariableDeclaration)); + } } } @@ -1215,7 +1254,11 @@ namespace ts { } if (expressions) { - statements = append(statements, setOriginalNode(setTextRange(factory.createExpressionStatement(factory.inlineExpressions(expressions)), node), node)); + const statement = setOriginalNode(setTextRange(factory.createExpressionStatement(factory.inlineExpressions(expressions)), node), node); + if (removeCommentsOnExpressions) { + removeAllComments(statement); + } + statements = append(statements, statement); } } else { @@ -1720,7 +1763,7 @@ namespace ts { return node; } - if (!isGeneratedIdentifier(node) && !isLocalName(node)) { + if (!(isGeneratedIdentifier(node) && !(node.autoGenerateFlags & GeneratedIdentifierFlags.AllowNameSubstitution)) && !isLocalName(node)) { const exportContainer = resolver.getReferencedExportContainer(node, isExportName(node)); if (exportContainer && exportContainer.kind === SyntaxKind.SourceFile) { return setTextRange( diff --git a/src/compiler/tsbuildPublic.ts b/src/compiler/tsbuildPublic.ts index a9e2c9a4a95..8d1c59fb3fd 100644 --- a/src/compiler/tsbuildPublic.ts +++ b/src/compiler/tsbuildPublic.ts @@ -23,6 +23,7 @@ namespace ts { /* @internal */ extendedDiagnostics?: boolean; /* @internal */ locale?: string; /* @internal */ generateCpuProfile?: string; + /* @internal */ generateTrace?: string; [option: string]: CompilerOptionsValue | undefined; } diff --git a/src/compiler/tsconfig.json b/src/compiler/tsconfig.json index 6b17c1b21d3..1edb2bbd63d 100644 --- a/src/compiler/tsconfig.json +++ b/src/compiler/tsconfig.json @@ -1,7 +1,8 @@ { "extends": "../tsconfig-base", "compilerOptions": { - "outFile": "../../built/local/compiler.js" + "outFile": "../../built/local/compiler.js", + "types": ["node"] }, "references": [ @@ -16,6 +17,7 @@ "performance.ts", "perfLogger.ts", "semver.ts", + "tracing.ts", "types.ts", "sys.ts", diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 1b96ff3c1ed..dbc916cd567 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -167,6 +167,7 @@ namespace ts { DeclareKeyword, GetKeyword, InferKeyword, + IntrinsicKeyword, IsKeyword, KeyOfKeyword, ModuleKeyword, @@ -230,6 +231,8 @@ namespace ts { MappedType, LiteralType, NamedTupleMember, + TemplateLiteralType, + TemplateLiteralTypeSpan, ImportType, // Binding patterns ObjectBindingPattern, @@ -357,6 +360,7 @@ namespace ts { // JSDoc nodes JSDocTypeExpression, + JSDocNameReference, // The * type JSDocAllType, // The ? type @@ -389,6 +393,7 @@ namespace ts { JSDocTypeTag, JSDocTemplateTag, JSDocTypedefTag, + JSDocSeeTag, JSDocPropertyTag, // Synthesized list @@ -565,6 +570,7 @@ namespace ts { | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword + | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword @@ -623,6 +629,7 @@ namespace ts { | SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword + | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword @@ -657,6 +664,8 @@ namespace ts { | SyntaxKind.IndexedAccessType | SyntaxKind.MappedType | SyntaxKind.LiteralType + | SyntaxKind.TemplateLiteralType + | SyntaxKind.TemplateLiteralTypeSpan | SyntaxKind.ImportType | SyntaxKind.ExpressionWithTypeArguments | SyntaxKind.JSDocTypeExpression @@ -1069,6 +1078,7 @@ namespace ts { ReservedInNestedScopes = 1 << 3, // Reserve the generated name in nested scopes Optimistic = 1 << 4, // First instance won't use '_#' if there's no conflict FileLevel = 1 << 5, // Use only the file identifiers list and not generated names to search for conflicts + AllowNameSubstitution = 1 << 6, // Used by `module.ts` to indicate generated nodes which can have substitutions performed upon them (as they were generated by an earlier transform phase) } export interface Identifier extends PrimaryExpression, Declaration { @@ -1081,6 +1091,7 @@ namespace ts { readonly originalKeywordKind?: SyntaxKind; // Original syntaxKind which get set so that we can report an error later /*@internal*/ readonly autoGenerateFlags?: GeneratedIdentifierFlags; // Specifies whether to auto-generate the text for an identifier. /*@internal*/ readonly autoGenerateId?: number; // Ensures unique generated identifiers get unique names, but clones get the same name. + /*@internal*/ generatedImportReference?: ImportSpecifier; // Reference to the generated import specifier this identifier refers to isInJSDocNamespace?: boolean; // if the node is a member in a JSDoc namespace /*@internal*/ typeArguments?: NodeArray; // Only defined on synthesized nodes. Though not syntactically valid, used in emitting diagnostics, quickinfo, and signature help. /*@internal*/ jsdocDotPos?: number; // Identifier occurs in JSDoc-style generic: Id. @@ -1620,6 +1631,7 @@ namespace ts { readonly kind: SyntaxKind.MappedType; readonly readonlyToken?: ReadonlyToken | PlusToken | MinusToken; readonly typeParameter: TypeParameterDeclaration; + readonly nameType?: TypeNode; readonly questionToken?: QuestionToken | PlusToken | MinusToken; readonly type?: TypeNode; } @@ -1639,6 +1651,19 @@ namespace ts { export type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral; export type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral; + export interface TemplateLiteralTypeNode extends TypeNode { + kind: SyntaxKind.TemplateLiteralType, + readonly head: TemplateHead; + readonly templateSpans: NodeArray; + } + + export interface TemplateLiteralTypeSpan extends TypeNode { + readonly kind: SyntaxKind.TemplateLiteralTypeSpan, + readonly parent: TemplateLiteralTypeNode; + readonly type: TypeNode; + readonly literal: TemplateMiddle | TemplateTail; + } + // Note: 'brands' in our syntax nodes serve to give us a small amount of nominal typing. // Consider 'Expression'. Without the brand, 'Expression' is actually no different // (structurally) than 'Node'. Because of this you can pass any Node to a function that @@ -2106,21 +2131,21 @@ namespace ts { export interface TemplateHead extends TemplateLiteralLikeNode { readonly kind: SyntaxKind.TemplateHead; - readonly parent: TemplateExpression; + readonly parent: TemplateExpression | TemplateLiteralTypeNode; /* @internal */ templateFlags?: TokenFlags; } export interface TemplateMiddle extends TemplateLiteralLikeNode { readonly kind: SyntaxKind.TemplateMiddle; - readonly parent: TemplateSpan; + readonly parent: TemplateSpan | TemplateLiteralTypeSpan; /* @internal */ templateFlags?: TokenFlags; } export interface TemplateTail extends TemplateLiteralLikeNode { readonly kind: SyntaxKind.TemplateTail; - readonly parent: TemplateSpan; + readonly parent: TemplateSpan | TemplateLiteralTypeSpan; /* @internal */ templateFlags?: TokenFlags; } @@ -3055,6 +3080,11 @@ namespace ts { readonly type: TypeNode; } + export interface JSDocNameReference extends Node { + readonly kind: SyntaxKind.JSDocNameReference; + readonly name: EntityName; + } + export interface JSDocType extends TypeNode { _jsDocTypeBrand: any; } @@ -3165,12 +3195,12 @@ namespace ts { export interface JSDocEnumTag extends JSDocTag, Declaration { readonly kind: SyntaxKind.JSDocEnumTag; readonly parent: JSDoc; - readonly typeExpression?: JSDocTypeExpression; + readonly typeExpression: JSDocTypeExpression; } export interface JSDocThisTag extends JSDocTag { readonly kind: SyntaxKind.JSDocThisTag; - readonly typeExpression?: JSDocTypeExpression; + readonly typeExpression: JSDocTypeExpression; } export interface JSDocTemplateTag extends JSDocTag { @@ -3179,6 +3209,11 @@ namespace ts { readonly typeParameters: NodeArray; } + export interface JSDocSeeTag extends JSDocTag { + readonly kind: SyntaxKind.JSDocSeeTag; + readonly name?: JSDocNameReference; + } + export interface JSDocReturnTag extends JSDocTag { readonly kind: SyntaxKind.JSDocReturnTag; readonly typeExpression?: JSDocTypeExpression; @@ -3729,6 +3764,8 @@ namespace ts { /* @internal */ getClassifiableNames(): Set<__String>; + getTypeCatalog(): readonly Type[]; + getNodeCount(): number; getIdentifierCount(): number; getSymbolCount(): number; @@ -3765,7 +3802,6 @@ namespace ts { /*@internal*/ isSourceOfProjectReferenceRedirect(fileName: string): boolean; /*@internal*/ getProgramBuildInfo?(): ProgramBuildInfo | undefined; /*@internal*/ emitBuildInfo(writeFile?: WriteFileCallback, cancellationToken?: CancellationToken): EmitResult; - /*@internal*/ getProbableSymlinks(): ReadonlyESMap; /** * This implementation handles file exists to be true if file is source of project reference redirect when program is created using useSourceOfProjectReferenceRedirect */ @@ -3938,7 +3974,8 @@ namespace ts { * This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value. */ getShorthandAssignmentValueSymbol(location: Node): Symbol | undefined; - getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol | undefined; + + getExportSpecifierLocalTargetSymbol(location: ExportSpecifier | Identifier): Symbol | undefined; /** * If a symbol is a local symbol with an associated exported symbol, returns the exported symbol. * Otherwise returns its input. @@ -3967,6 +4004,7 @@ namespace ts { getAugmentedPropertiesOfType(type: Type): Symbol[]; getRootSymbols(symbol: Symbol): readonly Symbol[]; + getSymbolOfExpando(node: Node, allowDeclaration: boolean): Symbol | undefined; getContextualType(node: Expression): Type | undefined; /* @internal */ getContextualType(node: Expression, contextFlags?: ContextFlags): Type | undefined; // eslint-disable-line @typescript-eslint/unified-signatures /* @internal */ getContextualTypeForObjectLiteralElement(element: ObjectLiteralElementLike): Type | undefined; @@ -4063,12 +4101,15 @@ namespace ts { /* @internal */ getGlobalDiagnostics(): Diagnostic[]; /* @internal */ getEmitResolver(sourceFile?: SourceFile, cancellationToken?: CancellationToken): EmitResolver; + /* @internal */ getTypeCatalog(): readonly Type[]; + /* @internal */ getNodeCount(): number; /* @internal */ getIdentifierCount(): number; /* @internal */ getSymbolCount(): number; /* @internal */ getTypeCount(): number; /* @internal */ getInstantiationCount(): number; /* @internal */ getRelationCacheSizes(): { assignable: number, identity: number, subtype: number, strictSubtype: number }; + /* @internal */ getRecursionIdentity(type: Type): object | undefined; /* @internal */ isArrayType(type: Type): boolean; /* @internal */ isTupleType(type: Type): boolean; @@ -4130,7 +4171,7 @@ namespace ts { export const enum UnionReduction { None = 0, Literal, - Subtype + Subtype, } /* @internal */ @@ -4695,7 +4736,7 @@ namespace ts { /* @internal */ export interface MappedSymbol extends TransientSymbol { mappedType: MappedType; - mapper: TypeMapper; + keyType: Type; } /* @internal */ @@ -4837,6 +4878,8 @@ namespace ts { Conditional = 1 << 24, // T extends U ? X : Y Substitution = 1 << 25, // Type parameter substitution NonPrimitive = 1 << 26, // intrinsic object type + TemplateLiteral = 1 << 27, // Template literal type + StringMapping = 1 << 28, // Uppercase/Lowercase type /* @internal */ AnyOrUnknown = Any | Unknown, @@ -4854,7 +4897,7 @@ namespace ts { Intrinsic = Any | Unknown | String | Number | BigInt | Boolean | BooleanLiteral | ESSymbol | Void | Undefined | Null | Never | NonPrimitive, /* @internal */ Primitive = String | Number | BigInt | Boolean | Enum | EnumLiteral | ESSymbol | Void | Undefined | Null | Literal | UniqueESSymbol, - StringLike = String | StringLiteral, + StringLike = String | StringLiteral | TemplateLiteral | StringMapping, NumberLike = Number | NumberLiteral | Enum, BigIntLike = BigInt | BigIntLiteral, BooleanLike = Boolean | BooleanLiteral, @@ -4867,7 +4910,7 @@ namespace ts { StructuredType = Object | Union | Intersection, TypeVariable = TypeParameter | IndexedAccess, InstantiableNonPrimitive = TypeVariable | Conditional | Substitution, - InstantiablePrimitive = Index, + InstantiablePrimitive = Index | TemplateLiteral | StringMapping, Instantiable = InstantiableNonPrimitive | InstantiablePrimitive, StructuredOrInstantiable = StructuredType | Instantiable, /* @internal */ @@ -4875,7 +4918,7 @@ namespace ts { /* @internal */ Simplifiable = IndexedAccess | Conditional, /* @internal */ - Substructure = Object | Union | Intersection | Index | IndexedAccess | Conditional | Substitution, + Substructure = Object | Union | Intersection | Index | IndexedAccess | Conditional | Substitution | TemplateLiteral | StringMapping, // 'Narrowable' types are types where narrowing actually narrows. // This *should* be every type other than null, undefined, void, and never Narrowable = Any | Unknown | StructuredOrInstantiable | StringLike | NumberLike | BigIntLike | BooleanLike | ESSymbol | UniqueESSymbol | NonPrimitive, @@ -4883,7 +4926,7 @@ namespace ts { NotPrimitiveUnion = Any | Unknown | Enum | Void | Never | StructuredOrInstantiable, // The following flags are aggregated during union and intersection type construction /* @internal */ - IncludesMask = Any | Unknown | Primitive | Never | Object | Union | Intersection | NonPrimitive, + IncludesMask = Any | Unknown | Primitive | Never | Object | Union | Intersection | NonPrimitive | TemplateLiteral, // The following flags are used for different purposes during union and intersection type construction /* @internal */ IncludesStructuredOrInstantiable = TypeParameter, @@ -5017,11 +5060,17 @@ namespace ts { IsNeverIntersectionComputed = 1 << 28, // IsNeverLike flag has been computed /* @internal */ IsNeverIntersection = 1 << 29, // Intersection reduces to never + /* @internal */ + IsClassInstanceClone = 1 << 30, // Type is a clone of a class instance type ClassOrInterface = Class | Interface, /* @internal */ RequiresWidening = ContainsWideningType | ContainsObjectOrArrayLiteral, /* @internal */ - PropagatingFlags = ContainsWideningType | ContainsObjectOrArrayLiteral | NonInferrableType + PropagatingFlags = ContainsWideningType | ContainsObjectOrArrayLiteral | NonInferrableType, + + // Object flags that uniquely identify the kind of ObjectType + /* @internal */ + ObjectTypeKindMask = ClassOrInterface | Reference | Tuple | Anonymous | Mapped | ReverseMapped | EvolvingArray, } /* @internal */ @@ -5048,6 +5097,8 @@ namespace ts { resolvedBaseConstructorType?: Type; // Resolved base constructor type of class /* @internal */ resolvedBaseTypes: BaseType[]; // Resolved base types + /* @internal */ + baseTypesResolved?: boolean; } // Object type or intersection of object types @@ -5174,9 +5225,11 @@ namespace ts { declaration: MappedTypeNode; typeParameter?: TypeParameter; constraintType?: Type; + nameType?: Type; templateType?: Type; modifiersType?: Type; resolvedApparentType?: Type; + containsError?: boolean; } export interface EvolvingArrayType extends ObjectType { @@ -5288,8 +5341,6 @@ namespace ts { node: ConditionalTypeNode; checkType: Type; extendsType: Type; - trueType: Type; - falseType: Type; isDistributive: boolean; inferTypeParameters?: TypeParameter[]; outerTypeParameters?: TypeParameter[]; @@ -5315,6 +5366,16 @@ namespace ts { combinedMapper?: TypeMapper; } + export interface TemplateLiteralType extends InstantiableType { + texts: readonly string[]; // Always one element longer than types + types: readonly Type[]; // Always at least one element + } + + export interface StringMappingType extends InstantiableType { + symbol: Symbol; + type: Type; + } + // Type parameter substitution (TypeFlags.Substitution) // Substitution types are created for type parameters or indexed access types that occur in the // true branch of a conditional type. For example, in 'T extends string ? Foo : Bar', the @@ -5350,7 +5411,7 @@ namespace ts { // We do not propagate `IsInnerCallChain` to instantiated signatures, as that would result in us // attempting to add `| undefined` on each recursive call to `getReturnTypeOfSignature` when // instantiating the return type. - PropagatingFlags = HasRestParameter | HasLiteralTypes, + PropagatingFlags = HasRestParameter | HasLiteralTypes | IsUntypedSignatureInJSFile, CallChainFlags = IsInnerCallChain | IsOuterCallChain, } @@ -5374,6 +5435,8 @@ namespace ts { /* @internal */ minArgumentCount: number; // Number of non-optional parameters /* @internal */ + resolvedMinArgumentCount?: number; // Number of non-optional parameters (excluding trailing `void`) + /* @internal */ target?: Signature; // Instantiation target /* @internal */ mapper?: TypeMapper; // Instantiation mapper @@ -5420,15 +5483,16 @@ namespace ts { export const enum InferencePriority { NakedTypeVariable = 1 << 0, // Naked type variable in union or intersection type - HomomorphicMappedType = 1 << 1, // Reverse inference for homomorphic mapped type - PartialHomomorphicMappedType = 1 << 2, // Partial reverse inference for homomorphic mapped type - MappedTypeConstraint = 1 << 3, // Reverse inference for mapped type - ContravariantConditional = 1 << 4, // Conditional type in contravariant position - ReturnType = 1 << 5, // Inference made from return type of generic function - LiteralKeyof = 1 << 6, // Inference made from a string literal to a keyof T - NoConstraints = 1 << 7, // Don't infer from constraints of instantiable types - AlwaysStrict = 1 << 8, // Always use strict rules for contravariant inferences - MaxValue = 1 << 9, // Seed for inference priority tracking + SpeculativeTuple = 1 << 1, // Speculative tuple inference + HomomorphicMappedType = 1 << 2, // Reverse inference for homomorphic mapped type + PartialHomomorphicMappedType = 1 << 3, // Partial reverse inference for homomorphic mapped type + MappedTypeConstraint = 1 << 4, // Reverse inference for mapped type + ContravariantConditional = 1 << 5, // Conditional type in contravariant position + ReturnType = 1 << 6, // Inference made from return type of generic function + LiteralKeyof = 1 << 7, // Inference made from a string literal to a keyof T + NoConstraints = 1 << 8, // Don't infer from constraints of instantiable types + AlwaysStrict = 1 << 9, // Always use strict rules for contravariant inferences + MaxValue = 1 << 10, // Seed for inference priority tracking PriorityImpliesCombination = ReturnType | MappedTypeConstraint | LiteralKeyof, // These priorities imply that the resulting type should be a combination of all candidates Circularity = -1, // Inference circularity (value less than all other priorities) @@ -5497,6 +5561,7 @@ namespace ts { export const enum AssignmentDeclarationKind { None, /// exports.name = expr + /// module.exports.name = expr ExportsProperty, /// module.exports = expr ModuleExports, @@ -5652,6 +5717,7 @@ namespace ts { /** An error if set - this should only go through the -b pipeline and not actually be observed */ /*@internal*/ build?: boolean; + bundledPackageName?: string; charset?: string; checkJs?: boolean; /* @internal */ configFilePath?: string; @@ -5666,12 +5732,14 @@ namespace ts { disableSizeLimit?: boolean; disableSourceOfProjectReferenceRedirect?: boolean; disableSolutionSearching?: boolean; + disableReferencedProjectLoad?: boolean; downlevelIteration?: boolean; emitBOM?: boolean; emitDecoratorMetadata?: boolean; experimentalDecorators?: boolean; forceConsistentCasingInFileNames?: boolean; /*@internal*/generateCpuProfile?: string; + /*@internal*/generateTrace?: string; /*@internal*/help?: boolean; importHelpers?: boolean; importsNotUsedAsValues?: ImportsNotUsedAsValues; @@ -5707,10 +5775,13 @@ namespace ts { assumeChangesOnlyAffectDirectDependencies?: boolean; noLib?: boolean; noResolve?: boolean; + noUncheckedIndexedAccess?: boolean; out?: string; outDir?: string; outFile?: string; paths?: MapLike; + /** The directory of the config file that specified 'paths'. Used to resolve relative paths when 'baseUrl' is absent. */ + /*@internal*/ pathsBasePath?: string; /*@internal*/ plugins?: PluginImport[]; preserveConstEnums?: boolean; preserveSymlinks?: boolean; @@ -5720,6 +5791,7 @@ namespace ts { reactNamespace?: string; jsxFactory?: string; jsxFragmentFactory?: string; + jsxImportSource?: string; composite?: boolean; incremental?: boolean; tsBuildInfoFile?: string; @@ -5794,7 +5866,9 @@ namespace ts { None = 0, Preserve = 1, React = 2, - ReactNative = 3 + ReactNative = 3, + ReactJSX = 4, + ReactJSXDev = 5, } export const enum ImportsNotUsedAsValues { @@ -5876,13 +5950,14 @@ namespace ts { /** * Present to report errors (user specified specs), validatedIncludeSpecs are used for file name matching */ - includeSpecs?: readonly string[]; + includeSpecs: readonly string[] | undefined; /** * Present to report errors (user specified specs), validatedExcludeSpecs are used for file name matching */ - excludeSpecs?: readonly string[]; - validatedIncludeSpecs?: readonly string[]; - validatedExcludeSpecs?: readonly string[]; + excludeSpecs: readonly string[] | undefined; + validatedFilesSpec: readonly string[] | undefined; + validatedIncludeSpecs: readonly string[] | undefined; + validatedExcludeSpecs: readonly string[] | undefined; wildcardDirectories: MapLike; } @@ -6236,7 +6311,7 @@ namespace ts { // TODO: later handle this in better way in builder host instead once the api for tsbuild finalizes and doesn't use compilerHost as base /*@internal*/createDirectory?(directory: string): void; - /*@internal*/getSymlinks?(): ReadonlyESMap; + /*@internal*/getSymlinkCache?(): SymlinkCache; } /** true if --out otherwise source file name */ @@ -6691,6 +6766,8 @@ namespace ts { createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; /* @internal */ createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode | undefined): IndexSignatureDeclaration; // eslint-disable-line @typescript-eslint/unified-signatures updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; + createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan; + updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan; // // Types @@ -6736,10 +6813,12 @@ namespace ts { updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode; createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; - createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; - updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; + createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; + updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode; updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]): LiteralTypeNode; + createTemplateLiteralType(head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; + updateTemplateLiteralType(node: TemplateLiteralTypeNode, head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; // // Binding Patterns @@ -6953,6 +7032,8 @@ namespace ts { updateJSDocNamepathType(node: JSDocNamepathType, type: TypeNode): JSDocNamepathType; createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression; updateJSDocTypeExpression(node: JSDocTypeExpression, type: TypeNode): JSDocTypeExpression; + createJSDocNameReference(name: EntityName): JSDocNameReference; + updateJSDocNameReference(node: JSDocNameReference, name: EntityName): JSDocNameReference; createJSDocTypeLiteral(jsDocPropertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral; updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsDocPropertyTags: readonly JSDocPropertyLikeTag[] | undefined, isArrayType: boolean | undefined): JSDocTypeLiteral; createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature; @@ -6967,11 +7048,13 @@ namespace ts { updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | undefined): JSDocPropertyTag; createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocTypeTag; updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocTypeTag; + createJSDocSeeTag(tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string): JSDocSeeTag; + updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string): JSDocSeeTag; createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocReturnTag; updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocReturnTag; - createJSDocThisTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocThisTag; + createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocThisTag; updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocThisTag; - createJSDocEnumTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocEnumTag; + createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocEnumTag; updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocEnumTag; createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string): JSDocCallbackTag; updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | undefined): JSDocCallbackTag; @@ -7646,6 +7729,7 @@ namespace ts { /*@internal*/ recordInternalSection?: boolean; /*@internal*/ stripInternal?: boolean; /*@internal*/ preserveSourceNewlines?: boolean; + /*@internal*/ terminateUnterminatedLiterals?: boolean; /*@internal*/ relativeToBuildInfo?: (path: string) => string; } @@ -7750,14 +7834,17 @@ namespace ts { useCaseSensitiveFileNames?(): boolean; fileExists(path: string): boolean; getCurrentDirectory(): string; + directoryExists?(path: string): boolean; readFile?(path: string): string | undefined; - getProbableSymlinks?(files: readonly SourceFile[]): ReadonlyESMap; + realpath?(path: string): string; + getSymlinkCache?(): SymlinkCache; getGlobalTypingsCacheLocation?(): string | undefined; getSourceFiles(): readonly SourceFile[]; readonly redirectTargetsMap: RedirectTargetsMap; getProjectReferenceRedirect(fileName: string): string | undefined; isSourceOfProjectReferenceRedirect(fileName: string): boolean; + getCompilerOptions(): CompilerOptions; } // Note: this used to be deprecated in our public API, but is still used internally @@ -7772,6 +7859,7 @@ namespace ts { reportInaccessibleUniqueSymbolError?(): void; reportCyclicStructureError?(): void; reportLikelyUnsafeImportRequiredError?(specifier: string): void; + reportTruncationError?(): void; moduleResolverHost?: ModuleSpecifierResolutionHost & { getCommonSourceDirectory(): string }; trackReferencedAmbientModule?(decl: ModuleDeclaration, symbol: Symbol): void; trackExternalModuleSymbolOfImportTypeNode?(symbol: Symbol): void; @@ -7976,6 +8064,14 @@ namespace ts { args: [{ name: "factory" }], kind: PragmaKindFlags.MultiLine }, + "jsximportsource": { + args: [{ name: "factory" }], + kind: PragmaKindFlags.MultiLine + }, + "jsxruntime": { + args: [{ name: "factory" }], + kind: PragmaKindFlags.MultiLine + }, } as const; /* @internal */ @@ -8049,7 +8145,7 @@ namespace ts { readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; - readonly includePackageJsonAutoImports?: "exclude-dev" | "all" | "none"; + readonly includePackageJsonAutoImports?: "auto" | "on" | "off"; readonly provideRefactorNotApplicableReason?: boolean; } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index e3c3e279ab8..95f81b987aa 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -100,28 +100,6 @@ namespace ts { !isJsonEqual(getCompilerOptionValue(oldOptions, o), getCompilerOptionValue(newOptions, o))); } - /** - * Iterates through the parent chain of a node and performs the callback on each parent until the callback - * returns a truthy value, then returns that value. - * If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit" - * At that point findAncestor returns undefined. - */ - export function findAncestor(node: Node | undefined, callback: (element: Node) => element is T): T | undefined; - export function findAncestor(node: Node | undefined, callback: (element: Node) => boolean | "quit"): Node | undefined; - export function findAncestor(node: Node, callback: (element: Node) => boolean | "quit"): Node | undefined { - while (node) { - const result = callback(node); - if (result === "quit") { - return undefined; - } - else if (result) { - return node; - } - node = node.parent; - } - return undefined; - } - export function forEachAncestor(node: Node, callback: (n: Node) => T | undefined | "quit"): T | undefined { while (true) { const res = callback(node); @@ -483,7 +461,8 @@ namespace ts { return node.pos; } - if (isJSDocNode(node)) { + if (isJSDocNode(node) || node.kind === SyntaxKind.JsxText) { + // JsxText cannot actually contain comments, even though the scanner will think it sees comments return skipTrivia((sourceFile || getSourceFileOfNode(node)).text, node.pos, /*stopAfterLineBreak*/ false, /*stopAtComments*/ true); } @@ -518,6 +497,10 @@ namespace ts { return !!findAncestor(node, isJSDocTypeExpression); } + export function isExportNamespaceAsDefaultDeclaration(node: Node): boolean { + return !!(isExportDeclaration(node) && node.exportClause && isNamespaceExport(node.exportClause) && node.exportClause.name.escapedText === "default"); + } + export function getTextOfNodeFromSourceText(sourceText: string, node: Node, includeTrivia = false): string { if (nodeIsMissing(node)) { return ""; @@ -557,10 +540,17 @@ namespace ts { return emitNode && emitNode.flags || 0; } - export function getLiteralText(node: LiteralLikeNode, sourceFile: SourceFile, neverAsciiEscape: boolean | undefined, jsxAttributeEscape: boolean) { + export const enum GetLiteralTextFlags { + None = 0, + NeverAsciiEscape = 1 << 0, + JsxAttributeEscape = 1 << 1, + TerminateUnterminatedLiterals = 1 << 2, + } + + export function getLiteralText(node: LiteralLikeNode, sourceFile: SourceFile, flags: GetLiteralTextFlags) { // If we don't need to downlevel and we can reach the original source text using // the node's parent reference, then simply get the text as it was originally written. - if (!nodeIsSynthesized(node) && node.parent && !( + if (!nodeIsSynthesized(node) && node.parent && !(flags & GetLiteralTextFlags.TerminateUnterminatedLiterals && node.isUnterminated) && !( (isNumericLiteral(node) && node.numericLiteralFlags & TokenFlags.ContainsSeparator) || isBigIntLiteral(node) )) { @@ -571,8 +561,8 @@ namespace ts { // or a (possibly escaped) quoted form of the original text if it's string-like. switch (node.kind) { case SyntaxKind.StringLiteral: { - const escapeText = jsxAttributeEscape ? escapeJsxAttributeString : - neverAsciiEscape || (getEmitFlags(node) & EmitFlags.NoAsciiEscaping) ? escapeString : + const escapeText = flags & GetLiteralTextFlags.JsxAttributeEscape ? escapeJsxAttributeString : + flags & GetLiteralTextFlags.NeverAsciiEscape || (getEmitFlags(node) & EmitFlags.NoAsciiEscaping) ? escapeString : escapeNonAsciiString; if ((node).singleQuote) { return "'" + escapeText(node.text, CharacterCodes.singleQuote) + "'"; @@ -587,7 +577,7 @@ namespace ts { case SyntaxKind.TemplateTail: { // If a NoSubstitutionTemplateLiteral appears to have a substitution in it, the original text // had to include a backslash: `not \${a} substitution`. - const escapeText = neverAsciiEscape || (getEmitFlags(node) & EmitFlags.NoAsciiEscaping) ? escapeString : + const escapeText = flags & GetLiteralTextFlags.NeverAsciiEscape || (getEmitFlags(node) & EmitFlags.NoAsciiEscaping) ? escapeString : escapeNonAsciiString; const rawText = (node).rawText || escapeTemplateSubstitution(escapeText(node.text, CharacterCodes.backtick)); @@ -605,7 +595,11 @@ namespace ts { } case SyntaxKind.NumericLiteral: case SyntaxKind.BigIntLiteral: + return node.text; case SyntaxKind.RegularExpressionLiteral: + if (flags & GetLiteralTextFlags.TerminateUnterminatedLiterals && node.isUnterminated) { + return node.text + (node.text.charCodeAt(node.text.length - 1) === CharacterCodes.backslash ? " /" : "/"); + } return node.text; } @@ -1613,6 +1607,10 @@ namespace ts { && (node).expression.kind === SyntaxKind.ThisKeyword; } + export function isThisInitializedDeclaration(node: Node | undefined): boolean { + return !!node && isVariableDeclaration(node) && node.initializer?.kind === SyntaxKind.ThisKeyword; + } + export function getEntityNameFromTypeNode(node: TypeNode): EntityNameOrEntityNameExpression | undefined { switch (node.kind) { case SyntaxKind.TypeReference: @@ -1847,6 +1845,11 @@ namespace ts { return ((node).moduleReference).expression; } + export function getExternalModuleRequireArgument(node: Node) { + return isRequireVariableDeclaration(node, /*requireStringLiteralLikeArgument*/ true) + && (getLeftmostAccessExpression(node.initializer) as CallExpression).arguments[0] as StringLiteral; + } + export function isInternalModuleImportEqualsDeclaration(node: Node): node is ImportEqualsDeclaration { return node.kind === SyntaxKind.ImportEqualsDeclaration && (node).moduleReference.kind !== SyntaxKind.ExternalModuleReference; } @@ -1914,7 +1917,10 @@ namespace ts { export function isRequireVariableDeclaration(node: Node, requireStringLiteralLikeArgument: true): node is RequireVariableDeclaration; export function isRequireVariableDeclaration(node: Node, requireStringLiteralLikeArgument: boolean): node is VariableDeclaration; export function isRequireVariableDeclaration(node: Node, requireStringLiteralLikeArgument: boolean): node is VariableDeclaration { - return isVariableDeclaration(node) && !!node.initializer && isRequireCall(node.initializer, requireStringLiteralLikeArgument); + if (node.kind === SyntaxKind.BindingElement) { + node = node.parent.parent; + } + return isVariableDeclaration(node) && !!node.initializer && isRequireCall(getLeftmostAccessExpression(node.initializer), requireStringLiteralLikeArgument); } export function isRequireVariableStatement(node: Node, requireStringLiteralLikeArgument = true): node is RequireVariableStatement { @@ -1931,48 +1937,6 @@ namespace ts { return getSourceTextOfNodeFromSourceFile(sourceFile, str).charCodeAt(0) === CharacterCodes.doubleQuote; } - export function getDeclarationOfExpando(node: Node): Node | undefined { - if (!node.parent) { - return undefined; - } - let name: Expression | BindingName | undefined; - let decl: Node | undefined; - if (isVariableDeclaration(node.parent) && node.parent.initializer === node) { - if (!isInJSFile(node) && !isVarConst(node.parent)) { - return undefined; - } - name = node.parent.name; - decl = node.parent; - } - else if (isBinaryExpression(node.parent)) { - const parentNode = node.parent; - const parentNodeOperator = node.parent.operatorToken.kind; - if (parentNodeOperator === SyntaxKind.EqualsToken && parentNode.right === node) { - name = parentNode.left; - decl = name; - } - else if (parentNodeOperator === SyntaxKind.BarBarToken || parentNodeOperator === SyntaxKind.QuestionQuestionToken) { - if (isVariableDeclaration(parentNode.parent) && parentNode.parent.initializer === parentNode) { - name = parentNode.parent.name; - decl = parentNode.parent; - } - else if (isBinaryExpression(parentNode.parent) && parentNode.parent.operatorToken.kind === SyntaxKind.EqualsToken && parentNode.parent.right === parentNode) { - name = parentNode.parent.left; - decl = name; - } - - if (!name || !isBindableStaticNameExpression(name) || !isSameEntityName(name, parentNode.left)) { - return undefined; - } - } - } - - if (!name || !getExpandoInitializer(node, isPrototypeAccess(name))) { - return undefined; - } - return decl; - } - export function isAssignmentDeclaration(decl: Declaration) { return isBinaryExpression(decl) || isAccessExpression(decl) || isIdentifier(decl) || isCallExpression(decl); } @@ -2092,7 +2056,7 @@ namespace ts { * var min = window.min || {} * my.app = self.my.app || class { } */ - function isSameEntityName(name: Expression, initializer: Expression): boolean { + export function isSameEntityName(name: Expression, initializer: Expression): boolean { if (isPropertyNameLiteral(name) && isPropertyNameLiteral(initializer)) { return getTextOfIdentifierOrLiteral(name) === getTextOfIdentifierOrLiteral(initializer); } @@ -2452,7 +2416,7 @@ namespace ts { } } - function getSingleVariableOfVariableStatement(node: Node): VariableDeclaration | undefined { + export function getSingleVariableOfVariableStatement(node: Node): VariableDeclaration | undefined { return isVariableStatement(node) ? firstOrUndefined(node.declarationList.declarations) : undefined; } @@ -2702,6 +2666,20 @@ namespace ts { return walkUp(node, SyntaxKind.ParenthesizedExpression); } + /** + * Walks up parenthesized types. + * It returns both the outermost parenthesized type and its parent. + * If given node is not a parenthesiezd type, undefined is return as the former. + */ + export function walkUpParenthesizedTypesAndGetParentAndChild(node: Node): [ParenthesizedTypeNode | undefined, Node] { + let child: ParenthesizedTypeNode | undefined; + while (node && node.kind === SyntaxKind.ParenthesizedType) { + child = node; + node = node.parent; + } + return [child, node]; + } + export function skipParentheses(node: Expression): Expression; export function skipParentheses(node: Node): Node; export function skipParentheses(node: Node): Node { @@ -3993,6 +3971,7 @@ namespace ts { getCanonicalFileName(p: string): string; getCommonSourceDirectory(): string; getCurrentDirectory(): string; + getCompilerOptions(): CompilerOptions; } export function getResolvedExternalModuleName(host: ResolveModuleNameResolutionHost, file: SourceFile, referenceFile?: SourceFile): string { @@ -4016,7 +3995,16 @@ namespace ts { const filePath = getNormalizedAbsolutePath(fileName, host.getCurrentDirectory()); const relativePath = getRelativePathToDirectoryOrUrl(dir, filePath, dir, getCanonicalFileName, /*isAbsolutePathAnUrl*/ false); const extensionless = removeFileExtension(relativePath); - return referencePath ? ensurePathIsNonModuleName(extensionless) : extensionless; + if (referencePath) { + return ensurePathIsNonModuleName(extensionless); + } + const options = host.getCompilerOptions(); + const rootPkgName = options.bundledPackageName || ""; + const newPath = combinePaths(rootPkgName, extensionless); + if (rootPkgName && getEmitModuleResolutionKind(options) === ModuleResolutionKind.NodeJs && endsWith(newPath, "/index")) { + return newPath.slice(0, newPath.length - "/index".length); + } + return newPath; } export function getOwnEmitOutputFilePath(fileName: string, host: EmitHost, extension: string) { @@ -4049,6 +4037,12 @@ namespace ts { return options.outFile || options.out; } + /** Returns 'undefined' if and only if 'options.paths' is undefined. */ + export function getPathsBasePath(options: CompilerOptions, host: { getCurrentDirectory?(): string }) { + if (!options.paths) return undefined; + return options.baseUrl ?? Debug.checkDefined(options.pathsBasePath || host.getCurrentDirectory?.(), "Encountered 'paths' without a 'baseUrl', config file, or host 'getCurrentDirectory'."); + } + export interface EmitFileNames { jsFilePath?: string | undefined; sourceMapFilePath?: string | undefined; @@ -4769,7 +4763,11 @@ namespace ts { } export function getLocalSymbolForExportDefault(symbol: Symbol) { - return isExportDefaultSymbol(symbol) ? symbol.declarations[0].localSymbol : undefined; + if (!isExportDefaultSymbol(symbol)) return undefined; + for (const decl of symbol.declarations) { + if (decl.localSymbol) return decl.localSymbol; + } + return undefined; } function isExportDefaultSymbol(symbol: Symbol): boolean { @@ -5433,6 +5431,13 @@ namespace ts { return node.kind === SyntaxKind.NamedImports || node.kind === SyntaxKind.NamedExports; } + export function getLeftmostAccessExpression(expr: Expression): Expression { + while (isAccessExpression(expr)) { + expr = expr.expression; + } + return expr; + } + export function getLeftmostExpression(node: Expression, stopAtCallExpressions: boolean) { while (true) { switch (node.kind) { @@ -5494,7 +5499,7 @@ namespace ts { function Type(this: Type, checker: TypeChecker, flags: TypeFlags) { this.flags = flags; - if (Debug.isDebugging) { + if (Debug.isDebugging || tracing.isTracing()) { this.checker = checker; } } @@ -5896,6 +5901,10 @@ namespace ts { return compilerOptions[flag] === undefined ? !!compilerOptions.strict : !!compilerOptions[flag]; } + export function getAllowJSCompilerOption(compilerOptions: CompilerOptions): boolean { + return compilerOptions.allowJs === undefined ? !!compilerOptions.checkJs : compilerOptions.allowJs; + } + export function compilerOptionsAffectSemanticDiagnostics(newOptions: CompilerOptions, oldOptions: CompilerOptions): boolean { return oldOptions !== newOptions && semanticDiagnosticsOptionDeclarations.some(option => !isJsonEqual(getCompilerOptionValue(oldOptions, option), getCompilerOptionValue(newOptions, option))); @@ -5910,6 +5919,22 @@ namespace ts { return option.strictFlag ? getStrictOptionValue(options, option.name as StrictOptionName) : options[option.name]; } + export function getJSXTransformEnabled(options: CompilerOptions): boolean { + const jsx = options.jsx; + return jsx === JsxEmit.React || jsx === JsxEmit.ReactJSX || jsx === JsxEmit.ReactJSXDev; + } + + export function getJSXImplicitImportBase(compilerOptions: CompilerOptions, file: SourceFile): string | undefined { + const jsxImportSourcePragmas = file.pragmas.get("jsximportsource"); + const jsxImportSourcePragma = isArray(jsxImportSourcePragmas) ? jsxImportSourcePragmas[0] : jsxImportSourcePragmas; + return compilerOptions.jsx === JsxEmit.ReactJSX || + compilerOptions.jsx === JsxEmit.ReactJSXDev || + compilerOptions.jsxImportSource || + jsxImportSourcePragma ? + jsxImportSourcePragma?.arguments.factory || compilerOptions.jsxImportSource || "react" : + undefined; + } + export function hasZeroOrOneAsteriskCharacter(str: string): boolean { let seenAsterisk = false; for (let i = 0; i < str.length; i++) { @@ -5926,28 +5951,57 @@ namespace ts { return true; } - export function discoverProbableSymlinks(files: readonly SourceFile[], getCanonicalFileName: GetCanonicalFileName, cwd: string): ReadonlyESMap { - const result = new Map(); + export interface SymlinkedDirectory { + real: string; + realPath: Path; + } + + export interface SymlinkCache { + getSymlinkedDirectories(): ReadonlyESMap | undefined; + getSymlinkedFiles(): ReadonlyESMap | undefined; + setSymlinkedDirectory(path: Path, directory: SymlinkedDirectory | false): void; + setSymlinkedFile(path: Path, real: string): void; + } + + export function createSymlinkCache(): SymlinkCache { + let symlinkedDirectories: ESMap | undefined; + let symlinkedFiles: ESMap | undefined; + return { + getSymlinkedFiles: () => symlinkedFiles, + getSymlinkedDirectories: () => symlinkedDirectories, + setSymlinkedFile: (path, real) => (symlinkedFiles || (symlinkedFiles = new Map())).set(path, real), + setSymlinkedDirectory: (path, directory) => (symlinkedDirectories || (symlinkedDirectories = new Map())).set(path, directory), + }; + } + + export function discoverProbableSymlinks(files: readonly SourceFile[], getCanonicalFileName: GetCanonicalFileName, cwd: string): SymlinkCache { + const cache = createSymlinkCache(); const symlinks = flatten(mapDefined(files, sf => sf.resolvedModules && compact(arrayFrom(mapIterator(sf.resolvedModules.values(), res => res && res.originalPath && res.resolvedFileName !== res.originalPath ? [res.resolvedFileName, res.originalPath] as const : undefined))))); for (const [resolvedPath, originalPath] of symlinks) { - const [commonResolved, commonOriginal] = guessDirectorySymlink(resolvedPath, originalPath, cwd, getCanonicalFileName); - result.set(commonOriginal, commonResolved); + const [commonResolved, commonOriginal] = guessDirectorySymlink(resolvedPath, originalPath, cwd, getCanonicalFileName) || emptyArray; + if (commonResolved && commonOriginal) { + cache.setSymlinkedDirectory( + toPath(commonOriginal, cwd, getCanonicalFileName), + { real: commonResolved, realPath: toPath(commonResolved, cwd, getCanonicalFileName) }); + } } - return result; + return cache; } - function guessDirectorySymlink(a: string, b: string, cwd: string, getCanonicalFileName: GetCanonicalFileName): [string, string] { + function guessDirectorySymlink(a: string, b: string, cwd: string, getCanonicalFileName: GetCanonicalFileName): [string, string] | undefined { const aParts = getPathComponents(toPath(a, cwd, getCanonicalFileName)); const bParts = getPathComponents(toPath(b, cwd, getCanonicalFileName)); + let isDirectory = false; while (!isNodeModulesOrScopedPackageDirectory(aParts[aParts.length - 2], getCanonicalFileName) && !isNodeModulesOrScopedPackageDirectory(bParts[bParts.length - 2], getCanonicalFileName) && getCanonicalFileName(aParts[aParts.length - 1]) === getCanonicalFileName(bParts[bParts.length - 1])) { aParts.pop(); bParts.pop(); + isDirectory = true; } - return [getPathFromPathComponents(aParts), getPathFromPathComponents(bParts)]; + return isDirectory ? [getPathFromPathComponents(aParts), getPathFromPathComponents(bParts)] : undefined; } // KLUDGE: Don't assume one 'node_modules' links to another. More likely a single directory inside the node_modules is the symlink. @@ -6320,7 +6374,7 @@ namespace ts { export function getSupportedExtensions(options?: CompilerOptions): readonly Extension[]; export function getSupportedExtensions(options?: CompilerOptions, extraFileExtensions?: readonly FileExtensionInfo[]): readonly string[]; export function getSupportedExtensions(options?: CompilerOptions, extraFileExtensions?: readonly FileExtensionInfo[]): readonly string[] { - const needJsExtensions = options && options.allowJs; + const needJsExtensions = options && getAllowJSCompilerOption(options); if (!extraFileExtensions || extraFileExtensions.length === 0) { return needJsExtensions ? allSupportedExtensions : supportedTSExtensions; diff --git a/src/compiler/utilitiesPublic.ts b/src/compiler/utilitiesPublic.ts index e9d28e8fab5..0f702eba480 100644 --- a/src/compiler/utilitiesPublic.ts +++ b/src/compiler/utilitiesPublic.ts @@ -403,6 +403,28 @@ namespace ts { return !nodeTest || nodeTest(node) ? node : undefined; } + /** + * Iterates through the parent chain of a node and performs the callback on each parent until the callback + * returns a truthy value, then returns that value. + * If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit" + * At that point findAncestor returns undefined. + */ + export function findAncestor(node: Node | undefined, callback: (element: Node) => element is T): T | undefined; + export function findAncestor(node: Node | undefined, callback: (element: Node) => boolean | "quit"): Node | undefined; + export function findAncestor(node: Node, callback: (element: Node) => boolean | "quit"): Node | undefined { + while (node) { + const result = callback(node); + if (result === "quit") { + return undefined; + } + else if (result) { + return node; + } + node = node.parent; + } + return undefined; + } + /** * Gets a value indicating whether a node originated in the parse tree. * diff --git a/src/compiler/visitorPublic.ts b/src/compiler/visitorPublic.ts index b2ec665ce89..8a06e110552 100644 --- a/src/compiler/visitorPublic.ts +++ b/src/compiler/visitorPublic.ts @@ -565,6 +565,7 @@ namespace ts { return factory.updateMappedTypeNode((node), nodeVisitor((node).readonlyToken, tokenVisitor, isToken), nodeVisitor((node).typeParameter, visitor, isTypeParameterDeclaration), + nodeVisitor((node).nameType, visitor, isTypeNode), nodeVisitor((node).questionToken, tokenVisitor, isToken), nodeVisitor((node).type, visitor, isTypeNode)); @@ -572,6 +573,16 @@ namespace ts { return factory.updateLiteralTypeNode(node, nodeVisitor((node).literal, visitor, isExpression)); + case SyntaxKind.TemplateLiteralType: + return factory.updateTemplateLiteralType(node, + nodeVisitor((node).head, visitor, isTemplateHead), + nodesVisitor((node).templateSpans, visitor, isTemplateLiteralTypeSpan)); + + case SyntaxKind.TemplateLiteralTypeSpan: + return factory.updateTemplateLiteralTypeSpan(node, + nodeVisitor((node).type, visitor, isTypeNode), + nodeVisitor((node).literal, visitor, isTemplateMiddleOrTemplateTail)); + // Binding patterns case SyntaxKind.ObjectBindingPattern: return factory.updateObjectBindingPattern(node, diff --git a/src/debug/dbg.ts b/src/debug/dbg.ts index fc8a5cdafc8..7e743bf491c 100644 --- a/src/debug/dbg.ts +++ b/src/debug/dbg.ts @@ -11,6 +11,10 @@ namespace Debug { type MethodDeclaration = Node; type Expression = Node; type SourceFile = Node; + type VariableDeclaration = Node; + type BindingElement = Node; + type CallExpression = Node; + type BinaryExpression = Node; interface SwitchStatement extends Node { caseBlock: CaseBlock; @@ -59,8 +63,6 @@ namespace Debug { } type FlowNode = - | AfterFinallyFlow - | PreFinallyFlow | FlowStart | FlowLabel | FlowAssignment @@ -76,14 +78,6 @@ namespace Debug { id?: number; } - interface AfterFinallyFlow extends FlowNodeBase { - antecedent: FlowNode; - } - - interface PreFinallyFlow extends FlowNodeBase { - antecedent: FlowNode; - } - interface FlowStart extends FlowNodeBase { node?: FunctionExpression | ArrowFunction | MethodDeclaration; } @@ -93,12 +87,12 @@ namespace Debug { } interface FlowAssignment extends FlowNodeBase { - node: Expression; + node: Expression | VariableDeclaration | BindingElement; antecedent: FlowNode; } interface FlowCall extends FlowNodeBase { - node: Expression; + node: CallExpression; antecedent: FlowNode; } @@ -115,7 +109,7 @@ namespace Debug { } interface FlowArrayMutation extends FlowNodeBase { - node: Expression; + node: CallExpression | BinaryExpression; antecedent: FlowNode; } @@ -192,6 +186,7 @@ namespace Debug { lane: number; endLane: number; level: number; + circular: boolean | "circularity"; } interface FlowGraphEdge { @@ -217,8 +212,9 @@ namespace Debug { const links: Record = Object.create(/*o*/ null); // eslint-disable-line no-null/no-null const nodes: FlowGraphNode[] = []; const edges: FlowGraphEdge[] = []; - const root = buildGraphNode(flowNode); + const root = buildGraphNode(flowNode, new Set()); for (const node of nodes) { + node.text = renderFlowNode(node.flowNode, node.circular); computeLevel(node); } @@ -263,26 +259,43 @@ namespace Debug { return parents; } - function buildGraphNode(flowNode: FlowNode) { + function buildGraphNode(flowNode: FlowNode, seen: Set): FlowGraphNode { const id = getDebugFlowNodeId(flowNode); let graphNode = links[id]; + if (graphNode && seen.has(flowNode)) { + graphNode.circular = true; + graphNode = { + id: -1, + flowNode, + edges: [], + text: "", + lane: -1, + endLane: -1, + level: -1, + circular: "circularity" + }; + nodes.push(graphNode); + return graphNode; + } + seen.add(flowNode); if (!graphNode) { - links[id] = graphNode = { id, flowNode, edges: [], text: renderFlowNode(flowNode), lane: -1, endLane: -1, level: -1 }; + links[id] = graphNode = { id, flowNode, edges: [], text: "", lane: -1, endLane: -1, level: -1, circular: false }; nodes.push(graphNode); if (hasAntecedents(flowNode)) { for (const antecedent of flowNode.antecedents) { - buildGraphEdge(graphNode, antecedent); + buildGraphEdge(graphNode, antecedent, seen); } } else if (hasAntecedent(flowNode)) { - buildGraphEdge(graphNode, flowNode.antecedent); + buildGraphEdge(graphNode, flowNode.antecedent, seen); } } + seen.delete(flowNode); return graphNode; } - function buildGraphEdge(source: FlowGraphNode, antecedent: FlowNode) { - const target = buildGraphNode(antecedent); + function buildGraphEdge(source: FlowGraphNode, antecedent: FlowNode, seen: Set) { + const target = buildGraphNode(antecedent, seen); const edge: FlowGraphEdge = { source, target }; edges.push(edge); source.edges.push(edge); @@ -353,8 +366,11 @@ namespace Debug { return getSourceTextOfNodeFromSourceFile(sourceFile, node, /*includeTrivia*/ false); } - function renderFlowNode(flowNode: FlowNode) { + function renderFlowNode(flowNode: FlowNode, circular: boolean | "circularity") { let text = getHeader(flowNode.flags); + if (circular) { + text = `${text}#${getDebugFlowNodeId(flowNode)}`; + } if (hasNode(flowNode)) { if (flowNode.node) { text += ` (${getNodeText(flowNode.node)})`; @@ -373,7 +389,7 @@ namespace Debug { } text += ` (${clauses.join(", ")})`; } - return text; + return circular === "circularity" ? `Circular(${text})` : text; } function renderGraph() { diff --git a/src/executeCommandLine/executeCommandLine.ts b/src/executeCommandLine/executeCommandLine.ts index 9d1ecc7c666..ce469755daf 100644 --- a/src/executeCommandLine/executeCommandLine.ts +++ b/src/executeCommandLine/executeCommandLine.ts @@ -456,6 +456,7 @@ namespace ts { updateSolutionBuilderHost(sys, cb, buildHost); const builder = createSolutionBuilder(buildHost, projects, buildOptions); const exitStatus = buildOptions.clean ? builder.clean() : builder.build(); + tracing.dumpLegend(); return sys.exit(exitStatus); } @@ -476,7 +477,7 @@ namespace ts { const currentDirectory = host.getCurrentDirectory(); const getCanonicalFileName = createGetCanonicalFileName(host.useCaseSensitiveFileNames()); changeCompilerHostLikeToUseCache(host, fileName => toPath(fileName, currentDirectory, getCanonicalFileName)); - enableStatistics(sys, options); + enableStatisticsAndTracing(sys, options, /*isBuildMode*/ false); const programOptions: CreateProgramOptions = { rootNames: fileNames, @@ -504,7 +505,7 @@ namespace ts { config: ParsedCommandLine ) { const { options, fileNames, projectReferences } = config; - enableStatistics(sys, options); + enableStatisticsAndTracing(sys, options, /*isBuildMode*/ false); const host = createIncrementalCompilerHost(options, sys); const exitStatus = ts.performIncrementalCompilation({ host, @@ -541,7 +542,7 @@ namespace ts { host.createProgram = (rootNames, options, host, oldProgram, configFileParsingDiagnostics, projectReferences) => { Debug.assert(rootNames !== undefined || (options === undefined && !!oldProgram)); if (options !== undefined) { - enableStatistics(sys, options); + enableStatisticsAndTracing(sys, options, /*isBuildMode*/ true); } return compileUsingBuilder(rootNames, options, host, oldProgram, configFileParsingDiagnostics, projectReferences); }; @@ -610,15 +611,28 @@ namespace ts { return system === sys && (compilerOptions.diagnostics || compilerOptions.extendedDiagnostics); } - function enableStatistics(sys: System, compilerOptions: CompilerOptions) { - if (canReportDiagnostics(sys, compilerOptions)) { + function canTrace(system: System, compilerOptions: CompilerOptions) { + return system === sys && compilerOptions.generateTrace; + } + + function enableStatisticsAndTracing(system: System, compilerOptions: CompilerOptions, isBuildMode: boolean) { + if (canReportDiagnostics(system, compilerOptions)) { performance.enable(); } + + if (canTrace(system, compilerOptions)) { + tracing.startTracing(compilerOptions.configFilePath, compilerOptions.generateTrace!, isBuildMode); + } } function reportStatistics(sys: System, program: Program) { - let statistics: Statistic[]; const compilerOptions = program.getCompilerOptions(); + + if (canTrace(sys, compilerOptions)) { + tracing.stopTracing(program.getTypeCatalog()); + } + + let statistics: Statistic[]; if (canReportDiagnostics(sys, compilerOptions)) { statistics = []; const memoryUsed = sys.getMemoryUsage ? sys.getMemoryUsage() : -1; diff --git a/src/harness/client.ts b/src/harness/client.ts index 32db9e92a7a..230517b599d 100644 --- a/src/harness/client.ts +++ b/src/harness/client.ts @@ -747,7 +747,7 @@ namespace ts.server { return notImplemented(); } - getEncodedSemanticClassifications(_fileName: string, _span: TextSpan): Classifications { + getEncodedSemanticClassifications(_fileName: string, _span: TextSpan, _format?: SemanticClassificationFormat): Classifications { return notImplemented(); } @@ -757,6 +757,7 @@ namespace ts.server { name: item.name, kind: item.kind, kindModifiers: item.kindModifiers, + containerName: item.containerName, span: this.decodeSpan(item.span, item.file), selectionSpan: this.decodeSpan(item.selectionSpan, item.file) }; @@ -778,7 +779,7 @@ namespace ts.server { provideCallHierarchyIncomingCalls(fileName: string, position: number) { const args = this.createFileLocationRequestArgs(fileName, position); - const request = this.processRequest(CommandNames.PrepareCallHierarchy, args); + const request = this.processRequest(CommandNames.ProvideCallHierarchyIncomingCalls, args); const response = this.processResponse(request); return response.body.map(item => this.convertCallHierarchyIncomingCall(item)); } @@ -792,7 +793,7 @@ namespace ts.server { provideCallHierarchyOutgoingCalls(fileName: string, position: number) { const args = this.createFileLocationRequestArgs(fileName, position); - const request = this.processRequest(CommandNames.PrepareCallHierarchy, args); + const request = this.processRequest(CommandNames.ProvideCallHierarchyOutgoingCalls, args); const response = this.processResponse(request); return response.body.map(item => this.convertCallHierarchyOutgoingCall(fileName, item)); } diff --git a/src/harness/compilerImpl.ts b/src/harness/compilerImpl.ts index 19d6545c999..0d24ee4797f 100644 --- a/src/harness/compilerImpl.ts +++ b/src/harness/compilerImpl.ts @@ -256,9 +256,29 @@ namespace compiler { if (compilerOptions.skipDefaultLibCheck === undefined) compilerOptions.skipDefaultLibCheck = true; if (compilerOptions.noErrorTruncation === undefined) compilerOptions.noErrorTruncation = true; + const preProgram = ts.length(rootFiles) < 100 ? ts.createProgram(rootFiles || [], { ...compilerOptions, configFile: compilerOptions.configFile, traceResolution: false }, host) : undefined; + const preErrors = preProgram && ts.getPreEmitDiagnostics(preProgram); + const program = ts.createProgram(rootFiles || [], compilerOptions, host); const emitResult = program.emit(); - const errors = ts.getPreEmitDiagnostics(program); + const postErrors = ts.getPreEmitDiagnostics(program); + const errors = preErrors && (preErrors.length !== postErrors.length) ? [...postErrors, + ts.addRelatedInfo( + ts.createCompilerDiagnostic({ + category: ts.DiagnosticCategory.Error, + code: -1, + key: "-1", + message: `Pre-emit (${preErrors.length}) and post-emit (${postErrors.length}) diagnostic counts do not match! This can indicate that a semantic _error_ was added by the emit resolver - such an error may not be reflected on the command line or in the editor, but may be captured in a baseline here!` + }), + ts.createCompilerDiagnostic({ + category: ts.DiagnosticCategory.Error, + code: -1, + key: "-1", + message: `The excess diagnostics are:` + }), + ...ts.filter(postErrors, p => !ts.some(preErrors, p2 => ts.compareDiagnostics(p, p2) === ts.Comparison.EqualTo)) + ) + ] : postErrors; return new CompilationResult(host, compilerOptions, program, emitResult, errors); } } diff --git a/src/harness/fourslashImpl.ts b/src/harness/fourslashImpl.ts index 7fa2854d2c3..a87d0a9e1da 100644 --- a/src/harness/fourslashImpl.ts +++ b/src/harness/fourslashImpl.ts @@ -339,17 +339,23 @@ namespace FourSlash { this.languageServiceAdapterHost.addScript(fileName, file, /*isRootFile*/ true); } }); - if (!compilationOptions.noLib) { - this.languageServiceAdapterHost.addScript(Harness.Compiler.defaultLibFileName, - Harness.Compiler.getDefaultLibrarySourceFile()!.text, /*isRootFile*/ false); - compilationOptions.lib?.forEach(fileName => { + if (!compilationOptions.noLib) { + const seen = new Set(); + const addSourceFile = (fileName: string) => { + if (seen.has(fileName)) return; + seen.add(fileName); const libFile = Harness.Compiler.getDefaultLibrarySourceFile(fileName); ts.Debug.assertIsDefined(libFile, `Could not find lib file '${fileName}'`); - if (libFile) { - this.languageServiceAdapterHost.addScript(fileName, libFile.text, /*isRootFile*/ false); + this.languageServiceAdapterHost.addScript(fileName, libFile.text, /*isRootFile*/ false); + if (!ts.some(libFile.libReferenceDirectives)) return; + for (const directive of libFile.libReferenceDirectives) { + addSourceFile(`lib.${directive.fileName}.d.ts`); } - }); + }; + + addSourceFile(Harness.Compiler.defaultLibFileName); + compilationOptions.lib?.forEach(addSourceFile); } } @@ -623,7 +629,7 @@ namespace FourSlash { ts.forEachKey(this.inputFiles, fileName => { if (!ts.isAnySupportedFileExtension(fileName) || Harness.getConfigNameFromFileName(fileName) - || !this.getProgram().getCompilerOptions().allowJs && !ts.resolutionExtensionIsTSOrJson(ts.extensionFromPath(fileName))) return; + || !ts.getAllowJSCompilerOption(this.getProgram().getCompilerOptions()) && !ts.resolutionExtensionIsTSOrJson(ts.extensionFromPath(fileName))) return; const errors = this.getDiagnostics(fileName).filter(e => e.category !== ts.DiagnosticCategory.Suggestion); if (errors.length) { this.printErrorLog(/*expectErrors*/ false, errors); @@ -830,6 +836,13 @@ namespace FourSlash { this.raiseError(`Expected 'isGlobalCompletion to be ${options.isGlobalCompletion}, got ${actualCompletions.isGlobalCompletion}`); } + if (ts.hasProperty(options, "optionalReplacementSpan")) { + assert.deepEqual( + actualCompletions.optionalReplacementSpan && actualCompletions.optionalReplacementSpan, + options.optionalReplacementSpan && ts.createTextSpanFromRange(options.optionalReplacementSpan), + "Expected 'optionalReplacementSpan' properties to match"); + } + const nameToEntries = new ts.Map(); for (const entry of actualCompletions.entries) { const entries = nameToEntries.get(entry.name); @@ -2448,8 +2461,7 @@ namespace FourSlash { const { fileName } = this.activeFile; const before = this.getFileContent(fileName); this.formatDocument(); - const after = this.getFileContent(fileName); - this.assertObjectsEqual(after, before); + this.verifyFileContent(fileName, before); } public verifyTextAtCaretIs(text: string) { @@ -2485,7 +2497,49 @@ namespace FourSlash { Harness.IO.log(this.spanInfoToString(this.getNameOrDottedNameSpan(pos)!, "**")); } - private verifyClassifications(expected: { classificationType: string; text: string; textSpan?: TextSpan }[], actual: ts.ClassifiedSpan[], sourceFileText: string) { + private classificationToIdentifier(classification: number){ + + const tokenTypes: string[] = []; + tokenTypes[ts.classifier.v2020.TokenType.class] = "class"; + tokenTypes[ts.classifier.v2020.TokenType.enum] = "enum"; + tokenTypes[ts.classifier.v2020.TokenType.interface] = "interface"; + tokenTypes[ts.classifier.v2020.TokenType.namespace] = "namespace"; + tokenTypes[ts.classifier.v2020.TokenType.typeParameter] = "typeParameter"; + tokenTypes[ts.classifier.v2020.TokenType.type] = "type"; + tokenTypes[ts.classifier.v2020.TokenType.parameter] = "parameter"; + tokenTypes[ts.classifier.v2020.TokenType.variable] = "variable"; + tokenTypes[ts.classifier.v2020.TokenType.enumMember] = "enumMember"; + tokenTypes[ts.classifier.v2020.TokenType.property] = "property"; + tokenTypes[ts.classifier.v2020.TokenType.function] = "function"; + tokenTypes[ts.classifier.v2020.TokenType.member] = "member"; + + const tokenModifiers: string[] = []; + tokenModifiers[ts.classifier.v2020.TokenModifier.async] = "async"; + tokenModifiers[ts.classifier.v2020.TokenModifier.declaration] = "declaration"; + tokenModifiers[ts.classifier.v2020.TokenModifier.readonly] = "readonly"; + tokenModifiers[ts.classifier.v2020.TokenModifier.static] = "static"; + tokenModifiers[ts.classifier.v2020.TokenModifier.local] = "local"; + tokenModifiers[ts.classifier.v2020.TokenModifier.defaultLibrary] = "defaultLibrary"; + + + function getTokenTypeFromClassification(tsClassification: number): number | undefined { + if (tsClassification > ts.classifier.v2020.TokenEncodingConsts.modifierMask) { + return (tsClassification >> ts.classifier.v2020.TokenEncodingConsts.typeOffset) - 1; + } + return undefined; + } + + function getTokenModifierFromClassification(tsClassification: number) { + return tsClassification & ts.classifier.v2020.TokenEncodingConsts.modifierMask; + } + + const typeIdx = getTokenTypeFromClassification(classification) || 0; + const modSet = getTokenModifierFromClassification(classification); + + return [tokenTypes[typeIdx], ...tokenModifiers.filter((_, i) => modSet & 1 << i)].join("."); + } + + private verifyClassifications(expected: { classificationType: string | number, text?: string; textSpan?: TextSpan }[], actual: (ts.ClassifiedSpan | ts.ClassifiedSpan2020)[] , sourceFileText: string) { if (actual.length !== expected.length) { this.raiseError("verifyClassifications failed - expected total classifications to be " + expected.length + ", but was " + actual.length + @@ -2494,10 +2548,12 @@ namespace FourSlash { ts.zipWith(expected, actual, (expectedClassification, actualClassification) => { const expectedType = expectedClassification.classificationType; - if (expectedType !== actualClassification.classificationType) { + const actualType = typeof actualClassification.classificationType === "number" ? this.classificationToIdentifier(actualClassification.classificationType) : actualClassification.classificationType; + + if (expectedType !== actualType) { this.raiseError("verifyClassifications failed - expected classifications type to be " + expectedType + ", but was " + - actualClassification.classificationType + + actualType + jsonMismatchString()); } @@ -2548,10 +2604,30 @@ namespace FourSlash { } } - public verifySemanticClassifications(expected: { classificationType: string; text: string }[]) { + public replaceWithSemanticClassifications(format: ts.SemanticClassificationFormat.TwentyTwenty) { const actual = this.languageService.getSemanticClassifications(this.activeFile.fileName, - ts.createTextSpan(0, this.activeFile.content.length)); + ts.createTextSpan(0, this.activeFile.content.length), format); + const replacement = [`const c2 = classification("2020");`,`verify.semanticClassificationsAre("2020",`]; + for (const a of actual) { + const identifier = this.classificationToIdentifier(a.classificationType as number); + const text = this.activeFile.content.slice(a.textSpan.start, a.textSpan.start + a.textSpan.length); + replacement.push(` c2.semanticToken("${identifier}", "${text}"), `); + }; + replacement.push(");"); + throw new Error("You need to change the source code of fourslash test to use replaceWithSemanticClassifications"); + + // const fs = require("fs"); + // const testfilePath = this.originalInputFileName.slice(1); + // const testfile = fs.readFileSync(testfilePath, "utf8"); + // const newfile = testfile.replace("verify.replaceWithSemanticClassifications(\"2020\")", replacement.join("\n")); + // fs.writeFileSync(testfilePath, newfile); + } + + + public verifySemanticClassifications(format: ts.SemanticClassificationFormat, expected: { classificationType: string | number; text?: string }[]) { + const actual = this.languageService.getSemanticClassifications(this.activeFile.fileName, + ts.createTextSpan(0, this.activeFile.content.length), format); this.verifyClassifications(expected, actual, this.activeFile.content); } @@ -2867,9 +2943,14 @@ namespace FourSlash { const change = ts.first(codeFix.changes); ts.Debug.assert(change.fileName === fileName); this.applyEdits(change.fileName, change.textChanges); - const text = range ? this.rangeText(range) : this.getFileContent(this.activeFile.fileName); + const text = range ? this.rangeText(range) : this.getFileContent(fileName); actualTextArray.push(text); - scriptInfo.updateContent(originalContent); + + // Undo changes to perform next fix + const span = change.textChanges[0].span; + const deletedText = originalContent.substr(span.start, change.textChanges[0].span.length); + const insertedText = change.textChanges[0].newText; + this.editScriptAndUpdateMarkers(fileName, span.start, span.start + insertedText.length, deletedText); } if (expectedTextArray.length !== actualTextArray.length) { this.raiseError(`Expected ${expectedTextArray.length} import fixes, got ${actualTextArray.length}`); @@ -3289,9 +3370,9 @@ namespace FourSlash { } } - public applyRefactor({ refactorName, actionName, actionDescription, newContent: newContentWithRenameMarker }: FourSlashInterface.ApplyRefactorOptions) { + public applyRefactor({ refactorName, actionName, actionDescription, newContent: newContentWithRenameMarker, triggerReason }: FourSlashInterface.ApplyRefactorOptions) { const range = this.getSelection(); - const refactors = this.getApplicableRefactorsAtSelection(); + const refactors = this.getApplicableRefactorsAtSelection(triggerReason); const refactorsWithName = refactors.filter(r => r.name === refactorName); if (refactorsWithName.length === 0) { this.raiseError(`The expected refactor: ${refactorName} is not available at the marker location.\nAvailable refactors: ${refactors.map(r => r.name)}`); @@ -3802,7 +3883,7 @@ namespace FourSlash { const testData = parseTestData(absoluteBasePath, content, absoluteFileName); const state = new TestState(absoluteFileName, absoluteBasePath, testType, testData); const actualFileName = Harness.IO.resolvePath(fileName) || absoluteFileName; - const output = ts.transpileModule(content, { reportDiagnostics: true, fileName: actualFileName, compilerOptions: { target: ts.ScriptTarget.ES2015, inlineSourceMap: true } }); + const output = ts.transpileModule(content, { reportDiagnostics: true, fileName: actualFileName, compilerOptions: { target: ts.ScriptTarget.ES2015, inlineSourceMap: true, inlineSources: true } }); if (output.diagnostics!.length > 0) { throw new Error(`Syntax error in ${absoluteBasePath}: ${output.diagnostics![0].messageText}`); } @@ -3812,7 +3893,7 @@ namespace FourSlash { function runCode(code: string, state: TestState, fileName: string): void { // Compile and execute the test const generatedFile = ts.changeExtension(fileName, ".js"); - const wrappedCode = `(function(test, goTo, plugins, verify, edit, debug, format, cancellation, classification, completion, verifyOperationIsCancelled) {${code}\n//# sourceURL=${generatedFile}\n})`; + const wrappedCode = `(function(test, goTo, plugins, verify, edit, debug, format, cancellation, classification, completion, verifyOperationIsCancelled) {${code}\n//# sourceURL=${ts.getBaseFileName(generatedFile)}\n})`; type SourceMapSupportModule = typeof import("source-map-support") & { // TODO(rbuckton): This is missing from the DT definitions and needs to be added. @@ -3847,7 +3928,7 @@ namespace FourSlash { const cancellation = new FourSlashInterface.Cancellation(state); // eslint-disable-next-line no-eval const f = eval(wrappedCode); - f(test, goTo, plugins, verify, edit, debug, format, cancellation, FourSlashInterface.Classification, FourSlashInterface.Completion, verifyOperationIsCancelled); + f(test, goTo, plugins, verify, edit, debug, format, cancellation, FourSlashInterface.classification, FourSlashInterface.Completion, verifyOperationIsCancelled); } catch (err) { // ensure 'source-map-support' is triggered while we still have the handler attached by accessing `error.stack`. diff --git a/src/harness/fourslashInterfaceImpl.ts b/src/harness/fourslashInterfaceImpl.ts index 183f23347a1..f946e2d8bc3 100644 --- a/src/harness/fourslashInterfaceImpl.ts +++ b/src/harness/fourslashInterfaceImpl.ts @@ -524,8 +524,12 @@ namespace FourSlashInterface { /** * This method *requires* an ordered stream of classifications for a file, and spans are highly recommended. */ - public semanticClassificationsAre(...classifications: Classification[]) { - this.state.verifySemanticClassifications(classifications); + public semanticClassificationsAre(format: ts.SemanticClassificationFormat, ...classifications: Classification[]) { + this.state.verifySemanticClassifications(format, classifications); + } + + public replaceWithSemanticClassifications(format: ts.SemanticClassificationFormat.TwentyTwenty) { + this.state.replaceWithSemanticClassifications(format); } public renameInfoSucceeded(displayName?: string, fullDisplayName?: string, kind?: string, kindModifiers?: string, fileToRename?: string, expectedRange?: FourSlash.Range, options?: ts.RenameInfoOptions) { @@ -768,101 +772,127 @@ namespace FourSlashInterface { } } - interface Classification { + interface OlderClassification { classificationType: ts.ClassificationTypeNames; text: string; textSpan?: FourSlash.TextSpan; } - export namespace Classification { - export function comment(text: string, position?: number): Classification { + + // The VS Code LSP + interface ModernClassification { + classificationType: string; + text?: string; + textSpan?: FourSlash.TextSpan; + } + + type Classification = OlderClassification | ModernClassification; + + export function classification(format: ts.SemanticClassificationFormat) { + + function semanticToken(identifier: string, text: string, _position: number): Classification { + return { + classificationType: identifier, + text + }; + } + + if (format === ts.SemanticClassificationFormat.TwentyTwenty) { + return { + semanticToken + }; + } + + // Defaults to the previous semantic classifier factory functions + + function comment(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.comment, text, position); } - export function identifier(text: string, position?: number): Classification { + function identifier(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.identifier, text, position); } - export function keyword(text: string, position?: number): Classification { + function keyword(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.keyword, text, position); } - export function numericLiteral(text: string, position?: number): Classification { + function numericLiteral(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.numericLiteral, text, position); } - export function operator(text: string, position?: number): Classification { + function operator(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.operator, text, position); } - export function stringLiteral(text: string, position?: number): Classification { + function stringLiteral(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.stringLiteral, text, position); } - export function whiteSpace(text: string, position?: number): Classification { + function whiteSpace(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.whiteSpace, text, position); } - export function text(text: string, position?: number): Classification { + function text(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.text, text, position); } - export function punctuation(text: string, position?: number): Classification { + function punctuation(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.punctuation, text, position); } - export function docCommentTagName(text: string, position?: number): Classification { + function docCommentTagName(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.docCommentTagName, text, position); } - export function className(text: string, position?: number): Classification { + function className(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.className, text, position); } - export function enumName(text: string, position?: number): Classification { + function enumName(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.enumName, text, position); } - export function interfaceName(text: string, position?: number): Classification { + function interfaceName(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.interfaceName, text, position); } - export function moduleName(text: string, position?: number): Classification { + function moduleName(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.moduleName, text, position); } - export function typeParameterName(text: string, position?: number): Classification { + function typeParameterName(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.typeParameterName, text, position); } - export function parameterName(text: string, position?: number): Classification { + function parameterName(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.parameterName, text, position); } - export function typeAliasName(text: string, position?: number): Classification { + function typeAliasName(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.typeAliasName, text, position); } - export function jsxOpenTagName(text: string, position?: number): Classification { + function jsxOpenTagName(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.jsxOpenTagName, text, position); } - export function jsxCloseTagName(text: string, position?: number): Classification { + function jsxCloseTagName(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.jsxCloseTagName, text, position); } - export function jsxSelfClosingTagName(text: string, position?: number): Classification { + function jsxSelfClosingTagName(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.jsxSelfClosingTagName, text, position); } - export function jsxAttribute(text: string, position?: number): Classification { + function jsxAttribute(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.jsxAttribute, text, position); } - export function jsxText(text: string, position?: number): Classification { + function jsxText(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.jsxText, text, position); } - export function jsxAttributeStringLiteralValue(text: string, position?: number): Classification { + function jsxAttributeStringLiteralValue(text: string, position?: number): Classification { return getClassification(ts.ClassificationTypeNames.jsxAttributeStringLiteralValue, text, position); } @@ -870,7 +900,35 @@ namespace FourSlashInterface { const textSpan = position === undefined ? undefined : { start: position, end: position + text.length }; return { classificationType, text, textSpan }; } + + return { + comment, + identifier, + keyword, + numericLiteral, + operator, + stringLiteral, + whiteSpace, + text, + punctuation, + docCommentTagName, + className, + enumName, + interfaceName, + moduleName, + typeParameterName, + parameterName, + typeAliasName, + jsxOpenTagName, + jsxCloseTagName, + jsxSelfClosingTagName, + jsxAttribute, + jsxText, + jsxAttributeStringLiteralValue, + getClassification + }; } + export namespace Completion { export import SortText = ts.Completions.SortText; export import CompletionSource = ts.Completions.CompletionSource; @@ -1007,6 +1065,10 @@ namespace FourSlashInterface { typeEntry("ConstructorParameters"), typeEntry("ReturnType"), typeEntry("InstanceType"), + typeEntry("Uppercase"), + typeEntry("Lowercase"), + typeEntry("Capitalize"), + typeEntry("Uncapitalize"), interfaceEntry("ThisType"), varEntry("ArrayBuffer"), interfaceEntry("ArrayBufferTypes"), @@ -1312,6 +1374,7 @@ namespace FourSlashInterface { "let", "package", "yield", + "as", "async", "await", ].map(keywordEntry); @@ -1452,6 +1515,7 @@ namespace FourSlashInterface { "let", "package", "yield", + "as", "async", "await", ].map(keywordEntry); @@ -1503,6 +1567,7 @@ namespace FourSlashInterface { actionName: string; actionDescription: string; newContent: NewFileContent; + triggerReason?: ts.RefactorTriggerReason; } export type ExpectedCompletionEntry = string | ExpectedCompletionEntryObject; @@ -1528,6 +1593,7 @@ namespace FourSlashInterface { readonly marker?: ArrayOrSingle; readonly isNewIdentifierLocation?: boolean; // Always tested readonly isGlobalCompletion?: boolean; // Only tested if set + readonly optionalReplacementSpan?: FourSlash.Range; // Only tested if set readonly exact?: ArrayOrSingle; readonly includes?: ArrayOrSingle; readonly excludes?: ArrayOrSingle; diff --git a/src/harness/harnessIO.ts b/src/harness/harnessIO.ts index c7f04cf277d..0c62fc78ec8 100644 --- a/src/harness/harnessIO.ts +++ b/src/harness/harnessIO.ts @@ -469,7 +469,7 @@ namespace Harness { if (vpath.isDeclaration(file.unitName) || vpath.isJson(file.unitName)) { dtsFiles.push(file); } - else if (vpath.isTypeScript(file.unitName) || (vpath.isJavaScript(file.unitName) && options.allowJs)) { + else if (vpath.isTypeScript(file.unitName) || (vpath.isJavaScript(file.unitName) && ts.getAllowJSCompilerOption(options))) { const declFile = findResultCodeFile(file.unitName); if (declFile && !findUnit(declFile.file, declInputFiles) && !findUnit(declFile.file, declOtherFiles)) { dtsFiles.push({ unitName: declFile.file, content: Utils.removeByteOrderMark(declFile.text) }); diff --git a/src/harness/harnessLanguageService.ts b/src/harness/harnessLanguageService.ts index 6c3ee40eee0..cc2f285fc5c 100644 --- a/src/harness/harnessLanguageService.ts +++ b/src/harness/harnessLanguageService.ts @@ -154,6 +154,19 @@ namespace Harness.LanguageService { return fileNames; } + public realpath(path: string): string { + try { + return this.vfs.realpathSync(path); + } + catch { + return path; + } + } + + public directoryExists(path: string) { + return this.vfs.statSync(path).isDirectory(); + } + public getScriptInfo(fileName: string): ScriptInfo | undefined { return this.scriptInfos.get(vpath.resolve(this.vfs.cwd(), fileName)); } @@ -448,14 +461,15 @@ namespace Harness.LanguageService { getSyntacticClassifications(fileName: string, span: ts.TextSpan): ts.ClassifiedSpan[] { return unwrapJSONCallResult(this.shim.getSyntacticClassifications(fileName, span.start, span.length)); } - getSemanticClassifications(fileName: string, span: ts.TextSpan): ts.ClassifiedSpan[] { - return unwrapJSONCallResult(this.shim.getSemanticClassifications(fileName, span.start, span.length)); + getSemanticClassifications(fileName: string, span: ts.TextSpan, format?: ts.SemanticClassificationFormat): ts.ClassifiedSpan[] { + return unwrapJSONCallResult(this.shim.getSemanticClassifications(fileName, span.start, span.length, format)); } getEncodedSyntacticClassifications(fileName: string, span: ts.TextSpan): ts.Classifications { return unwrapJSONCallResult(this.shim.getEncodedSyntacticClassifications(fileName, span.start, span.length)); } - getEncodedSemanticClassifications(fileName: string, span: ts.TextSpan): ts.Classifications { - return unwrapJSONCallResult(this.shim.getEncodedSemanticClassifications(fileName, span.start, span.length)); + getEncodedSemanticClassifications(fileName: string, span: ts.TextSpan, format?: ts.SemanticClassificationFormat): ts.Classifications { + const responseFormat = format || ts.SemanticClassificationFormat.Original; + return unwrapJSONCallResult(this.shim.getEncodedSemanticClassifications(fileName, span.start, span.length, responseFormat)); } getCompletionsAtPosition(fileName: string, position: number, preferences: ts.UserPreferences | undefined): ts.CompletionInfo { return unwrapJSONCallResult(this.shim.getCompletionsAtPosition(fileName, position, preferences)); @@ -720,10 +734,15 @@ namespace Harness.LanguageService { fileName = Compiler.defaultLibFileName; } - const snapshot = this.host.getScriptSnapshot(fileName); + // System FS would follow symlinks, even though snapshots are stored by original file name + const snapshot = this.host.getScriptSnapshot(fileName) || this.host.getScriptSnapshot(this.realpath(fileName)); return snapshot && ts.getSnapshotText(snapshot); } + realpath(path: string) { + return this.host.realpath(path); + } + writeFile = ts.noop; resolvePath(path: string): string { @@ -731,7 +750,7 @@ namespace Harness.LanguageService { } fileExists(path: string): boolean { - return !!this.host.getScriptSnapshot(path); + return this.host.fileExists(path); } directoryExists(): boolean { diff --git a/src/harness/virtualFileSystemWithWatch.ts b/src/harness/virtualFileSystemWithWatch.ts index c0e66430e9a..d04a27d8abf 100644 --- a/src/harness/virtualFileSystemWithWatch.ts +++ b/src/harness/virtualFileSystemWithWatch.ts @@ -1203,9 +1203,11 @@ interface Array { length: number; [n: number]: T; }` } function baselineOutputs(baseline: string[], output: readonly string[], start: number, end = output.length) { + let baselinedOutput: string[] | undefined; for (let i = start; i < end; i++) { - baseline.push(output[i].replace(/Elapsed::\s[0-9]+ms/g, "Elapsed:: *ms")); + (baselinedOutput ||= []).push(output[i].replace(/Elapsed::\s[0-9]+ms/g, "Elapsed:: *ms")); } + if (baselinedOutput) baseline.push(baselinedOutput.join("")); } export type TestServerHostTrackingWrittenFiles = TestServerHost & { writtenFiles: ESMap; }; diff --git a/src/jsTyping/shared.ts b/src/jsTyping/shared.ts index ce6004f251d..b41d3d0c455 100644 --- a/src/jsTyping/shared.ts +++ b/src/jsTyping/shared.ts @@ -57,6 +57,6 @@ namespace ts.server { export function nowString() { // E.g. "12:34:56.789" const d = new Date(); - return `${d.getHours()}:${d.getMinutes()}:${d.getSeconds()}.${d.getMilliseconds()}`; + return `${padLeft(d.getHours().toString(), 2, "0")}:${padLeft(d.getMinutes().toString(), 2, "0")}:${padLeft(d.getSeconds().toString(), 2, "0")}.${padLeft(d.getMilliseconds().toString(), 3, "0")}`; } } diff --git a/src/lib/dom.generated.d.ts b/src/lib/dom.generated.d.ts index 81e514517a5..82c019c03a3 100644 --- a/src/lib/dom.generated.d.ts +++ b/src/lib/dom.generated.d.ts @@ -135,29 +135,21 @@ interface AudioWorkletNodeOptions extends AudioNodeOptions { interface AuthenticationExtensionsClientInputs { appid?: string; - authnSel?: AuthenticatorSelectionList; - exts?: boolean; - loc?: boolean; - txAuthGeneric?: txAuthGenericArg; - txAuthSimple?: string; - uvi?: boolean; + appidExclude?: string; + credProps?: boolean; uvm?: boolean; } interface AuthenticationExtensionsClientOutputs { appid?: boolean; - authnSel?: boolean; - exts?: AuthenticationExtensionsSupported; - loc?: Coordinates; - txAuthGeneric?: ArrayBuffer; - txAuthSimple?: string; - uvi?: ArrayBuffer; + credProps?: CredentialPropertiesOutput; uvm?: UvmEntries; } interface AuthenticatorSelectionCriteria { authenticatorAttachment?: AuthenticatorAttachment; requireResidentKey?: boolean; + residentKey?: ResidentKeyRequirement; userVerification?: UserVerificationRequirement; } @@ -284,6 +276,10 @@ interface CredentialCreationOptions { signal?: AbortSignal; } +interface CredentialPropertiesOutput { + rk?: boolean; +} + interface CredentialRequestOptions { mediation?: CredentialMediationRequirement; publicKey?: PublicKeyCredentialRequestOptions; @@ -649,6 +645,8 @@ interface KeyboardEventInit extends EventModifierInit { code?: string; isComposing?: boolean; key?: string; + /** @deprecated */ + keyCode?: number; location?: number; repeat?: boolean; } @@ -1096,7 +1094,6 @@ interface PublicKeyCredentialDescriptor { } interface PublicKeyCredentialEntity { - icon?: string; name: string; } @@ -1896,11 +1893,6 @@ interface WorkletOptions { credentials?: RequestCredentials; } -interface txAuthGenericArg { - content: ArrayBuffer; - contentType: string; -} - interface EventListener { (evt: Event): void; } @@ -3620,17 +3612,6 @@ declare var ConvolverNode: { new(context: BaseAudioContext, options?: ConvolverOptions): ConvolverNode; }; -/** The position and altitude of the device on Earth, as well as the accuracy with which these properties are calculated. */ -interface Coordinates { - readonly accuracy: number; - readonly altitude: number | null; - readonly altitudeAccuracy: number | null; - readonly heading: number | null; - readonly latitude: number; - readonly longitude: number; - readonly speed: number | null; -} - /** This Streams API interface provides a built-in byte length queuing strategy that can be used when constructing streams. */ interface CountQueuingStrategy extends QueuingStrategy { highWaterMark: number; @@ -3799,7 +3780,7 @@ declare var DOMException: { /** An object providing methods which are not dependent on any particular document. Such an object is returned by the Document.implementation property. */ interface DOMImplementation { - createDocument(namespaceURI: string | null, qualifiedName: string | null, doctype: DocumentType | null): Document; + createDocument(namespace: string | null, qualifiedName: string | null, doctype?: DocumentType | null): XMLDocument; createDocumentType(qualifiedName: string, publicId: string, systemId: string): DocumentType; createHTMLDocument(title?: string): Document; /** @deprecated */ @@ -4167,7 +4148,7 @@ interface DataTransfer { * * The possible values are "none", "copy", "link", and "move". */ - dropEffect: string; + dropEffect: "none" | "copy" | "link" | "move"; /** * Returns the kinds of operations that are to be allowed. * @@ -4175,7 +4156,7 @@ interface DataTransfer { * * The possible values are "none", "copy", "copyLink", "copyMove", "link", "linkMove", "move", "all", and "uninitialized", */ - effectAllowed: string; + effectAllowed: "none" | "copy" | "copyLink" | "copyMove" | "link" | "linkMove" | "move" | "all" | "uninitialized"; /** * Returns a FileList of the files being dragged, if any. */ @@ -5148,8 +5129,8 @@ interface Element extends Node, Animatable, ChildNode, InnerHTML, NonDocumentTyp * Returns the qualified names of all element's attributes. Can contain duplicates. */ getAttributeNames(): string[]; - getAttributeNode(name: string): Attr | null; - getAttributeNodeNS(namespaceURI: string, localName: string): Attr | null; + getAttributeNode(qualifiedName: string): Attr | null; + getAttributeNodeNS(namespace: string | null, localName: string): Attr | null; getBoundingClientRect(): DOMRect; getClientRects(): DOMRectList; /** @@ -5659,6 +5640,52 @@ interface Geolocation { watchPosition(successCallback: PositionCallback, errorCallback?: PositionErrorCallback, options?: PositionOptions): number; } +declare var Geolocation: { + prototype: Geolocation; + new(): Geolocation; +}; + +interface GeolocationCoordinates { + readonly accuracy: number; + readonly altitude: number | null; + readonly altitudeAccuracy: number | null; + readonly heading: number | null; + readonly latitude: number; + readonly longitude: number; + readonly speed: number | null; +} + +declare var GeolocationCoordinates: { + prototype: GeolocationCoordinates; + new(): GeolocationCoordinates; +}; + +interface GeolocationPosition { + readonly coords: GeolocationCoordinates; + readonly timestamp: number; +} + +declare var GeolocationPosition: { + prototype: GeolocationPosition; + new(): GeolocationPosition; +}; + +interface GeolocationPositionError { + readonly code: number; + readonly message: string; + readonly PERMISSION_DENIED: number; + readonly POSITION_UNAVAILABLE: number; + readonly TIMEOUT: number; +} + +declare var GeolocationPositionError: { + prototype: GeolocationPositionError; + new(): GeolocationPositionError; + readonly PERMISSION_DENIED: number; + readonly POSITION_UNAVAILABLE: number; + readonly TIMEOUT: number; +}; + interface GlobalEventHandlersEventMap { "abort": UIEvent; "animationcancel": AnimationEvent; @@ -8926,6 +8953,10 @@ interface HTMLVideoElement extends HTMLMediaElement { * Gets or sets the height of the video element. */ height: number; + /** + * Gets or sets the playsinline of the video element. for example, On iPhone, video elements will now be allowed to play inline, and will not automatically enter fullscreen mode when playback begins. + */ + playsInline: boolean; /** * Gets or sets a URL of an image to display, for example, like a movie poster. This can be a still frame from the video, or another image if no video data is available. */ @@ -9003,12 +9034,6 @@ declare var History: { new(): History; }; -interface HkdfCtrParams extends Algorithm { - context: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; - hash: string | Algorithm; - label: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; -} - interface IDBArrayKey extends Array { } @@ -9110,7 +9135,7 @@ interface IDBDatabase extends EventTarget { * * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction. */ - createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore; + createObjectStore(name: string, options?: IDBObjectStoreParameters): IDBObjectStore; /** * Deletes the object store with the given name. * @@ -9558,8 +9583,8 @@ interface ImageData { declare var ImageData: { prototype: ImageData; - new(width: number, height: number): ImageData; - new(array: Uint8ClampedArray, width: number, height?: number): ImageData; + new(sw: number, sh: number): ImageData; + new(data: Uint8ClampedArray, sw: number, sh?: number): ImageData; }; interface InnerHTML { @@ -11767,21 +11792,6 @@ declare var PopStateEvent: { new(type: string, eventInitDict?: PopStateEventInit): PopStateEvent; }; -/** The position of the concerned device at a given time. The position, represented by a Coordinates object, comprehends the 2D position of the device, on a spheroid representing the Earth, but also its altitude and its speed. */ -interface Position { - readonly coords: Coordinates; - readonly timestamp: number; -} - -/** The reason of an error occurring when using the geolocating device. */ -interface PositionError { - readonly code: number; - readonly message: string; - readonly PERMISSION_DENIED: number; - readonly POSITION_UNAVAILABLE: number; - readonly TIMEOUT: number; -} - /** A processing instruction embeds application-specific instructions in XML which can be ignored by other applications that don't recognize them. */ interface ProcessingInstruction extends CharacterData, LinkStyle { readonly ownerDocument: Document; @@ -12473,6 +12483,11 @@ interface ReadableByteStreamController { error(error?: any): void; } +declare var ReadableByteStreamController: { + prototype: ReadableByteStreamController; + new(): ReadableByteStreamController; +}; + /** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */ interface ReadableStream { readonly locked: boolean; @@ -12497,12 +12512,22 @@ interface ReadableStreamBYOBReader { releaseLock(): void; } +declare var ReadableStreamBYOBReader: { + prototype: ReadableStreamBYOBReader; + new(): ReadableStreamBYOBReader; +}; + interface ReadableStreamBYOBRequest { readonly view: ArrayBufferView; respond(bytesWritten: number): void; respondWithNewView(view: ArrayBufferView): void; } +declare var ReadableStreamBYOBRequest: { + prototype: ReadableStreamBYOBRequest; + new(): ReadableStreamBYOBRequest; +}; + interface ReadableStreamDefaultController { readonly desiredSize: number | null; close(): void; @@ -12510,6 +12535,11 @@ interface ReadableStreamDefaultController { error(error?: any): void; } +declare var ReadableStreamDefaultController: { + prototype: ReadableStreamDefaultController; + new(): ReadableStreamDefaultController; +}; + interface ReadableStreamDefaultReader { readonly closed: Promise; cancel(reason?: any): Promise; @@ -12517,6 +12547,11 @@ interface ReadableStreamDefaultReader { releaseLock(): void; } +declare var ReadableStreamDefaultReader: { + prototype: ReadableStreamDefaultReader; + new(): ReadableStreamDefaultReader; +}; + interface ReadableStreamReader { cancel(): Promise; read(): Promise>; @@ -15379,16 +15414,16 @@ declare var StyleSheetList: { /** This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). */ interface SubtleCrypto { decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise; - deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise; - deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise; + deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise; + deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise; digest(algorithm: AlgorithmIdentifier, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise; encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise; exportKey(format: "jwk", key: CryptoKey): Promise; exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): Promise; exportKey(format: string, key: CryptoKey): Promise; - generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise; generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise; + generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise; importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise; importKey(format: "raw" | "pkcs8" | "spki", keyData: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise; importKey(format: string, keyData: JsonWebKey | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise; @@ -15864,6 +15899,11 @@ interface TransformStreamDefaultController { terminate(): void; } +declare var TransformStreamDefaultController: { + prototype: TransformStreamDefaultController; + new(): TransformStreamDefaultController; +}; + /** Events providing information related to transitions. */ interface TransitionEvent extends Event { readonly elapsedTime: number; @@ -18664,6 +18704,11 @@ interface WritableStreamDefaultController { error(error?: any): void; } +declare var WritableStreamDefaultController: { + prototype: WritableStreamDefaultController; + new(): WritableStreamDefaultController; +}; + /** This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink. */ interface WritableStreamDefaultWriter { readonly closed: Promise; @@ -18675,6 +18720,11 @@ interface WritableStreamDefaultWriter { write(chunk: W): Promise; } +declare var WritableStreamDefaultWriter: { + prototype: WritableStreamDefaultWriter; + new(): WritableStreamDefaultWriter; +}; + /** An XML document. It inherits from the generic Document and does not add any specific methods or properties to it: nevertheless, several algorithms behave differently with the two types of documents. */ interface XMLDocument extends Document { addEventListener(type: K, listener: (this: XMLDocument, ev: DocumentEventMap[K]) => any, options?: boolean | AddEventListenerOptions): void; @@ -19177,11 +19227,11 @@ interface PerformanceObserverCallback { } interface PositionCallback { - (position: Position): void; + (position: GeolocationPosition): void; } interface PositionErrorCallback { - (positionError: PositionError): void; + (positionError: GeolocationPositionError): void; } interface QueuingStrategySizeCallback { @@ -19461,7 +19511,8 @@ declare var location: Location; declare var locationbar: BarProp; declare var menubar: BarProp; declare var msContentScript: ExtensionScriptApis; -declare const name: never; +/** @deprecated */ +declare const name: void; declare var navigator: Navigator; declare var offscreenBuffering: string | boolean; declare var oncompassneedscalibration: ((this: Window, ev: Event) => any) | null; @@ -19891,9 +19942,6 @@ type PerformanceEntryList = PerformanceEntry[]; type ReadableStreamReadResult = ReadableStreamReadValueResult | ReadableStreamReadDoneResult; type VibratePattern = number | number[]; type COSEAlgorithmIdentifier = number; -type AuthenticatorSelectionList = AAGUID[]; -type AAGUID = BufferSource; -type AuthenticationExtensionsSupported = string[]; type UvmEntry = number[]; type UvmEntries = UvmEntry[]; type AlgorithmIdentifier = string | Algorithm; @@ -19933,7 +19981,7 @@ type WindowProxy = Window; type AlignSetting = "center" | "end" | "left" | "right" | "start"; type AnimationPlayState = "finished" | "idle" | "paused" | "running"; type AppendMode = "segments" | "sequence"; -type AttestationConveyancePreference = "direct" | "indirect" | "none"; +type AttestationConveyancePreference = "direct" | "enterprise" | "indirect" | "none"; type AudioContextLatencyCategory = "balanced" | "interactive" | "playback"; type AudioContextState = "closed" | "running" | "suspended"; type AuthenticatorAttachment = "cross-platform" | "platform"; @@ -20045,6 +20093,7 @@ type RequestCredentials = "include" | "omit" | "same-origin"; type RequestDestination = "" | "audio" | "audioworklet" | "document" | "embed" | "font" | "image" | "manifest" | "object" | "paintworklet" | "report" | "script" | "sharedworker" | "style" | "track" | "video" | "worker" | "xslt"; type RequestMode = "cors" | "navigate" | "no-cors" | "same-origin"; type RequestRedirect = "error" | "follow" | "manual"; +type ResidentKeyRequirement = "discouraged" | "preferred" | "required"; type ResizeQuality = "high" | "low" | "medium" | "pixelated"; type ResponseType = "basic" | "cors" | "default" | "error" | "opaque" | "opaqueredirect"; type ScopedCredentialType = "ScopedCred"; diff --git a/src/lib/dom.iterable.generated.d.ts b/src/lib/dom.iterable.generated.d.ts index 00b23466494..d7787b97daa 100644 --- a/src/lib/dom.iterable.generated.d.ts +++ b/src/lib/dom.iterable.generated.d.ts @@ -109,6 +109,13 @@ interface Headers { values(): IterableIterator; } +interface IDBDatabase { + /** + * Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. + */ + transaction(storeNames: string | Iterable, mode?: IDBTransactionMode): IDBTransaction; +} + interface IDBObjectStore { /** * Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException. diff --git a/src/lib/es2015.iterable.d.ts b/src/lib/es2015.iterable.d.ts index 374aad93229..da6bec04adf 100644 --- a/src/lib/es2015.iterable.d.ts +++ b/src/lib/es2015.iterable.d.ts @@ -154,7 +154,7 @@ interface Set { */ entries(): IterableIterator<[T, T]>; /** - * Despite its name, returns an iterable of the values in the set, + * Despite its name, returns an iterable of the values in the set. */ keys(): IterableIterator; @@ -174,7 +174,7 @@ interface ReadonlySet { entries(): IterableIterator<[T, T]>; /** - * Despite its name, returns an iterable of the values in the set, + * Despite its name, returns an iterable of the values in the set. */ keys(): IterableIterator; @@ -222,10 +222,6 @@ interface PromiseConstructor { race(values: Iterable>): Promise; } -declare namespace Reflect { - function enumerate(target: object): IterableIterator; -} - interface String { /** Iterator */ [Symbol.iterator](): IterableIterator; diff --git a/src/lib/es2015.promise.d.ts b/src/lib/es2015.promise.d.ts index 9c99f6be1d4..7d31dc96685 100644 --- a/src/lib/es2015.promise.d.ts +++ b/src/lib/es2015.promise.d.ts @@ -10,7 +10,7 @@ interface PromiseConstructor { * a resolve callback used to resolve the promise with a value or the result of another promise, * and a reject callback used to reject the promise with a provided reason or error. */ - new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; + new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; /** * Creates a Promise that is resolved with an array of results when all of the provided Promises @@ -113,18 +113,18 @@ interface PromiseConstructor { */ reject(reason?: any): Promise; + /** + * Creates a new resolved promise. + * @returns A resolved promise. + */ + resolve(): Promise; + /** * Creates a new resolved promise for the provided value. * @param value A promise. * @returns A promise whose internal state matches the provided promise. */ resolve(value: T | PromiseLike): Promise; - - /** - * Creates a new resolved promise . - * @returns A resolved promise. - */ - resolve(): Promise; } declare var Promise: PromiseConstructor; diff --git a/src/lib/es2015.proxy.d.ts b/src/lib/es2015.proxy.d.ts index 50671aedcce..628cf6da9d2 100644 --- a/src/lib/es2015.proxy.d.ts +++ b/src/lib/es2015.proxy.d.ts @@ -9,7 +9,6 @@ interface ProxyHandler { set? (target: T, p: PropertyKey, value: any, receiver: any): boolean; deleteProperty? (target: T, p: PropertyKey): boolean; defineProperty? (target: T, p: PropertyKey, attributes: PropertyDescriptor): boolean; - enumerate? (target: T): PropertyKey[]; ownKeys? (target: T): PropertyKey[]; apply? (target: T, thisArg: any, argArray?: any): any; construct? (target: T, argArray: any, newTarget?: any): object; diff --git a/src/lib/es2015.symbol.wellknown.d.ts b/src/lib/es2015.symbol.wellknown.d.ts index 89d7b82eae0..dce75ddab70 100644 --- a/src/lib/es2015.symbol.wellknown.d.ts +++ b/src/lib/es2015.symbol.wellknown.d.ts @@ -63,6 +63,11 @@ interface SymbolConstructor { } interface Symbol { + /** + * Converts a Symbol object to a symbol. + */ + [Symbol.toPrimitive](hint: string): symbol; + readonly [Symbol.toStringTag]: string; } diff --git a/src/lib/es2020.d.ts b/src/lib/es2020.d.ts index 86b473e6d49..f420cd61b1d 100644 --- a/src/lib/es2020.d.ts +++ b/src/lib/es2020.d.ts @@ -1,6 +1,7 @@ /// /// /// +/// /// /// /// diff --git a/src/lib/es2020.intl.d.ts b/src/lib/es2020.intl.d.ts index bd65cfd54ee..225e060f60b 100644 --- a/src/lib/es2020.intl.d.ts +++ b/src/lib/es2020.intl.d.ts @@ -263,13 +263,17 @@ declare namespace Intl { }; interface NumberFormatOptions { + compactDisplay?: string; notation?: string; + signDisplay?: string; unit?: string; unitDisplay?: string; } interface ResolvedNumberFormatOptions { + compactDisplay?: string; notation?: string; + signDisplay?: string; unit?: string; unitDisplay?: string; } diff --git a/src/lib/es2020.sharedmemory.d.ts b/src/lib/es2020.sharedmemory.d.ts new file mode 100644 index 00000000000..e8403c18ba8 --- /dev/null +++ b/src/lib/es2020.sharedmemory.d.ts @@ -0,0 +1,79 @@ +interface Atomics { + /** + * Adds a value to the value at the given position in the array, returning the original value. + * Until this atomic operation completes, any other read or write operation against the array + * will block. + */ + add(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Stores the bitwise AND of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or + * write operation against the array will block. + */ + and(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Replaces the value at the given position in the array if the original value equals the given + * expected value, returning the original value. Until this atomic operation completes, any + * other read or write operation against the array will block. + */ + compareExchange(typedArray: BigInt64Array | BigUint64Array, index: number, expectedValue: bigint, replacementValue: bigint): bigint; + + /** + * Replaces the value at the given position in the array, returning the original value. Until + * this atomic operation completes, any other read or write operation against the array will + * block. + */ + exchange(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Returns the value at the given position in the array. Until this atomic operation completes, + * any other read or write operation against the array will block. + */ + load(typedArray: BigInt64Array | BigUint64Array, index: number): bigint; + + /** + * Stores the bitwise OR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + or(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Stores a value at the given position in the array, returning the new value. Until this + * atomic operation completes, any other read or write operation against the array will block. + */ + store(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * Subtracts a value from the value at the given position in the array, returning the original + * value. Until this atomic operation completes, any other read or write operation against the + * array will block. + */ + sub(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; + + /** + * If the value at the given position in the array is equal to the provided value, the current + * agent is put to sleep causing execution to suspend until the timeout expires (returning + * `"timed-out"`) or until the agent is awoken (returning `"ok"`); otherwise, returns + * `"not-equal"`. + */ + wait(typedArray: BigInt64Array, index: number, value: bigint, timeout?: number): "ok" | "not-equal" | "timed-out"; + + /** + * Wakes up sleeping agents that are waiting on the given index of the array, returning the + * number of agents that were awoken. + * @param typedArray A shared BigInt64Array. + * @param index The position in the typedArray to wake up on. + * @param count The number of sleeping agents to notify. Defaults to +Infinity. + */ + notify(typedArray: BigInt64Array, index: number, count?: number): number; + + /** + * Stores the bitwise XOR of a value with the value at the given position in the array, + * returning the original value. Until this atomic operation completes, any other read or write + * operation against the array will block. + */ + xor(typedArray: BigInt64Array | BigUint64Array, index: number, value: bigint): bigint; +} diff --git a/src/lib/es5.d.ts b/src/lib/es5.d.ts index e111d36d117..cf95c473240 100644 --- a/src/lib/es5.d.ts +++ b/src/lib/es5.d.ts @@ -1376,7 +1376,7 @@ interface ArrayConstructor { (arrayLength?: number): any[]; (arrayLength: number): T[]; (...items: T[]): T[]; - isArray(arg: any): arg is any[]; + isArray(arg: T | {}): arg is T extends readonly any[] ? (unknown extends T ? never : readonly any[]) : any[]; readonly prototype: any[]; } @@ -1396,7 +1396,7 @@ declare type PropertyDecorator = (target: Object, propertyKey: string | symbol) declare type MethodDecorator = (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor) => TypedPropertyDescriptor | void; declare type ParameterDecorator = (target: Object, propertyKey: string | symbol, parameterIndex: number) => void; -declare type PromiseConstructorLike = new (executor: (resolve: (value?: T | PromiseLike) => void, reject: (reason?: any) => void) => void) => PromiseLike; +declare type PromiseConstructorLike = new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void) => PromiseLike; interface PromiseLike { /** @@ -1508,6 +1508,26 @@ type ReturnType any> = T extends (...args: any) => i */ type InstanceType any> = T extends new (...args: any) => infer R ? R : any; +/** + * Convert string literal type to uppercase + */ +type Uppercase = intrinsic; + +/** + * Convert string literal type to lowercase + */ +type Lowercase = intrinsic; + +/** + * Convert first character of string literal type to uppercase + */ +type Capitalize = intrinsic; + +/** + * Convert first character of string literal type to lowercase + */ +type Uncapitalize = intrinsic; + /** * Marker for contextual 'this' type */ @@ -1692,6 +1712,7 @@ interface DataView { } interface DataViewConstructor { + readonly prototype: DataView; new(buffer: ArrayBufferLike, byteOffset?: number, byteLength?: number): DataView; } declare var DataView: DataViewConstructor; @@ -1946,8 +1967,8 @@ interface Int8Array { interface Int8ArrayConstructor { readonly prototype: Int8Array; new(length: number): Int8Array; - new(arrayOrArrayBuffer: ArrayLike | ArrayBufferLike): Int8Array; - new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Int8Array; + new(array: ArrayLike | ArrayBufferLike): Int8Array; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int8Array; /** * The size in bytes of each element in the array. @@ -2229,8 +2250,8 @@ interface Uint8Array { interface Uint8ArrayConstructor { readonly prototype: Uint8Array; new(length: number): Uint8Array; - new(arrayOrArrayBuffer: ArrayLike | ArrayBufferLike): Uint8Array; - new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Uint8Array; + new(array: ArrayLike | ArrayBufferLike): Uint8Array; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8Array; /** * The size in bytes of each element in the array. @@ -2511,8 +2532,8 @@ interface Uint8ClampedArray { interface Uint8ClampedArrayConstructor { readonly prototype: Uint8ClampedArray; new(length: number): Uint8ClampedArray; - new(arrayOrArrayBuffer: ArrayLike | ArrayBufferLike): Uint8ClampedArray; - new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Uint8ClampedArray; + new(array: ArrayLike | ArrayBufferLike): Uint8ClampedArray; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint8ClampedArray; /** * The size in bytes of each element in the array. @@ -2791,8 +2812,8 @@ interface Int16Array { interface Int16ArrayConstructor { readonly prototype: Int16Array; new(length: number): Int16Array; - new(arrayOrArrayBuffer: ArrayLike | ArrayBufferLike): Int16Array; - new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Int16Array; + new(array: ArrayLike | ArrayBufferLike): Int16Array; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int16Array; /** * The size in bytes of each element in the array. @@ -3074,8 +3095,8 @@ interface Uint16Array { interface Uint16ArrayConstructor { readonly prototype: Uint16Array; new(length: number): Uint16Array; - new(arrayOrArrayBuffer: ArrayLike | ArrayBufferLike): Uint16Array; - new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Uint16Array; + new(array: ArrayLike | ArrayBufferLike): Uint16Array; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint16Array; /** * The size in bytes of each element in the array. @@ -3356,8 +3377,8 @@ interface Int32Array { interface Int32ArrayConstructor { readonly prototype: Int32Array; new(length: number): Int32Array; - new(arrayOrArrayBuffer: ArrayLike | ArrayBufferLike): Int32Array; - new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Int32Array; + new(array: ArrayLike | ArrayBufferLike): Int32Array; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Int32Array; /** * The size in bytes of each element in the array. @@ -3637,8 +3658,8 @@ interface Uint32Array { interface Uint32ArrayConstructor { readonly prototype: Uint32Array; new(length: number): Uint32Array; - new(arrayOrArrayBuffer: ArrayLike | ArrayBufferLike): Uint32Array; - new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Uint32Array; + new(array: ArrayLike | ArrayBufferLike): Uint32Array; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Uint32Array; /** * The size in bytes of each element in the array. @@ -3919,8 +3940,8 @@ interface Float32Array { interface Float32ArrayConstructor { readonly prototype: Float32Array; new(length: number): Float32Array; - new(arrayOrArrayBuffer: ArrayLike | ArrayBufferLike): Float32Array; - new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Float32Array; + new(array: ArrayLike | ArrayBufferLike): Float32Array; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float32Array; /** * The size in bytes of each element in the array. @@ -4193,8 +4214,8 @@ interface Float64Array { interface Float64ArrayConstructor { readonly prototype: Float64Array; new(length: number): Float64Array; - new(arrayOrArrayBuffer: ArrayLike | ArrayBufferLike): Float64Array; - new(buffer: ArrayBufferLike, byteOffset: number, length?: number): Float64Array; + new(array: ArrayLike | ArrayBufferLike): Float64Array; + new(buffer: ArrayBufferLike, byteOffset?: number, length?: number): Float64Array; /** * The size in bytes of each element in the array. diff --git a/src/lib/libs.json b/src/lib/libs.json index 8c3f93b9b17..574c8b27c37 100644 --- a/src/lib/libs.json +++ b/src/lib/libs.json @@ -14,6 +14,7 @@ "dom.iterable.generated", "webworker.generated", "webworker.importscripts", + "webworker.iterable.generated", "scripthost", // By-feature options "es2015.core", @@ -42,6 +43,7 @@ "es2019.symbol", "es2020.bigint", "es2020.promise", + "es2020.sharedmemory", "es2020.string", "es2020.symbol.wellknown", "es2020.intl", @@ -62,6 +64,7 @@ "dom.generated": "lib.dom.d.ts", "dom.iterable.generated": "lib.dom.iterable.d.ts", "webworker.generated": "lib.webworker.d.ts", + "webworker.iterable.generated": "lib.webworker.iterable.d.ts", "es5.full": "lib.d.ts", "es2015.full": "lib.es6.d.ts" } diff --git a/src/lib/webworker.generated.d.ts b/src/lib/webworker.generated.d.ts index 5d76c914bb8..f24219da587 100644 --- a/src/lib/webworker.generated.d.ts +++ b/src/lib/webworker.generated.d.ts @@ -194,6 +194,12 @@ interface GetNotificationOptions { tag?: string; } +interface HkdfParams extends Algorithm { + hash: HashAlgorithmIdentifier; + info: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; + salt: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; +} + interface HmacImportParams extends Algorithm { hash: HashAlgorithmIdentifier; length?: number; @@ -1654,12 +1660,6 @@ declare var Headers: { new(init?: HeadersInit): Headers; }; -interface HkdfCtrParams extends Algorithm { - context: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; - hash: string | Algorithm; - label: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer; -} - interface IDBArrayKey extends Array { } @@ -1761,7 +1761,7 @@ interface IDBDatabase extends EventTarget { * * Throws a "InvalidStateError" DOMException if not called within an upgrade transaction. */ - createObjectStore(name: string, optionalParameters?: IDBObjectStoreParameters): IDBObjectStore; + createObjectStore(name: string, options?: IDBObjectStoreParameters): IDBObjectStore; /** * Deletes the object store with the given name. * @@ -2199,8 +2199,8 @@ interface ImageData { declare var ImageData: { prototype: ImageData; - new(width: number, height: number): ImageData; - new(array: Uint8ClampedArray, width: number, height?: number): ImageData; + new(sw: number, sh: number): ImageData; + new(data: Uint8ClampedArray, sw: number, sh?: number): ImageData; }; /** This Channel Messaging API interface allows us to create a new message channel and send data through it via its two MessagePort properties. */ @@ -2715,6 +2715,11 @@ interface ReadableByteStreamController { error(error?: any): void; } +declare var ReadableByteStreamController: { + prototype: ReadableByteStreamController; + new(): ReadableByteStreamController; +}; + /** This Streams API interface represents a readable stream of byte data. The Fetch API offers a concrete instance of a ReadableStream through the body property of a Response object. */ interface ReadableStream { readonly locked: boolean; @@ -2739,12 +2744,22 @@ interface ReadableStreamBYOBReader { releaseLock(): void; } +declare var ReadableStreamBYOBReader: { + prototype: ReadableStreamBYOBReader; + new(): ReadableStreamBYOBReader; +}; + interface ReadableStreamBYOBRequest { readonly view: ArrayBufferView; respond(bytesWritten: number): void; respondWithNewView(view: ArrayBufferView): void; } +declare var ReadableStreamBYOBRequest: { + prototype: ReadableStreamBYOBRequest; + new(): ReadableStreamBYOBRequest; +}; + interface ReadableStreamDefaultController { readonly desiredSize: number | null; close(): void; @@ -2752,6 +2767,11 @@ interface ReadableStreamDefaultController { error(error?: any): void; } +declare var ReadableStreamDefaultController: { + prototype: ReadableStreamDefaultController; + new(): ReadableStreamDefaultController; +}; + interface ReadableStreamDefaultReader { readonly closed: Promise; cancel(reason?: any): Promise; @@ -2759,6 +2779,11 @@ interface ReadableStreamDefaultReader { releaseLock(): void; } +declare var ReadableStreamDefaultReader: { + prototype: ReadableStreamDefaultReader; + new(): ReadableStreamDefaultReader; +}; + interface ReadableStreamReader { cancel(): Promise; read(): Promise>; @@ -3034,16 +3059,16 @@ declare var StorageManager: { /** This Web Crypto API interface provides a number of low-level cryptographic functions. It is accessed via the Crypto.subtle properties available in a window context (via Window.crypto). */ interface SubtleCrypto { decrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise; - deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise; - deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfCtrParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise; + deriveBits(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, length: number): Promise; + deriveKey(algorithm: AlgorithmIdentifier | EcdhKeyDeriveParams | DhKeyDeriveParams | ConcatParams | HkdfParams | Pbkdf2Params, baseKey: CryptoKey, derivedKeyType: string | AesDerivedKeyParams | HmacImportParams | ConcatParams | HkdfParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise; digest(algorithm: AlgorithmIdentifier, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise; encrypt(algorithm: AlgorithmIdentifier | RsaOaepParams | AesCtrParams | AesCbcParams | AesCmacParams | AesGcmParams | AesCfbParams, key: CryptoKey, data: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer): Promise; exportKey(format: "jwk", key: CryptoKey): Promise; exportKey(format: "raw" | "pkcs8" | "spki", key: CryptoKey): Promise; exportKey(format: string, key: CryptoKey): Promise; - generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise; generateKey(algorithm: RsaHashedKeyGenParams | EcKeyGenParams | DhKeyGenParams, extractable: boolean, keyUsages: KeyUsage[]): Promise; generateKey(algorithm: AesKeyGenParams | HmacKeyGenParams | Pbkdf2Params, extractable: boolean, keyUsages: KeyUsage[]): Promise; + generateKey(algorithm: AlgorithmIdentifier, extractable: boolean, keyUsages: KeyUsage[]): Promise; importKey(format: "jwk", keyData: JsonWebKey, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise; importKey(format: "raw" | "pkcs8" | "spki", keyData: Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise; importKey(format: string, keyData: JsonWebKey | Int8Array | Int16Array | Int32Array | Uint8Array | Uint16Array | Uint32Array | Uint8ClampedArray | Float32Array | Float64Array | DataView | ArrayBuffer, algorithm: AlgorithmIdentifier | RsaHashedImportParams | EcKeyImportParams | HmacImportParams | DhImportKeyParams | AesKeyAlgorithm, extractable: boolean, keyUsages: KeyUsage[]): Promise; @@ -3236,6 +3261,11 @@ interface TransformStreamDefaultController { terminate(): void; } +declare var TransformStreamDefaultController: { + prototype: TransformStreamDefaultController; + new(): TransformStreamDefaultController; +}; + /** The URL interface represents an object providing static methods used for creating object URLs. */ interface URL { hash: string; @@ -5512,6 +5542,11 @@ interface WritableStreamDefaultController { error(error?: any): void; } +declare var WritableStreamDefaultController: { + prototype: WritableStreamDefaultController; + new(): WritableStreamDefaultController; +}; + /** This Streams API interface is the object returned by WritableStream.getWriter() and once created locks the < writer to the WritableStream ensuring that no other streams can write to the underlying sink. */ interface WritableStreamDefaultWriter { readonly closed: Promise; @@ -5523,6 +5558,11 @@ interface WritableStreamDefaultWriter { write(chunk: W): Promise; } +declare var WritableStreamDefaultWriter: { + prototype: WritableStreamDefaultWriter; + new(): WritableStreamDefaultWriter; +}; + interface XMLHttpRequestEventMap extends XMLHttpRequestEventTargetEventMap { "readystatechange": Event; } diff --git a/src/lib/webworker.iterable.generated.d.ts b/src/lib/webworker.iterable.generated.d.ts new file mode 100644 index 00000000000..249b5b899d9 --- /dev/null +++ b/src/lib/webworker.iterable.generated.d.ts @@ -0,0 +1,146 @@ +///////////////////////////// +/// Worker Iterable APIs +///////////////////////////// + +interface Cache { + addAll(requests: Iterable): Promise; +} + +interface CanvasPathDrawingStyles { + setLineDash(segments: Iterable): void; +} + +interface DOMStringList { + [Symbol.iterator](): IterableIterator; +} + +interface FileList { + [Symbol.iterator](): IterableIterator; +} + +interface FormData { + [Symbol.iterator](): IterableIterator<[string, FormDataEntryValue]>; + /** + * Returns an array of key, value pairs for every entry in the list. + */ + entries(): IterableIterator<[string, FormDataEntryValue]>; + /** + * Returns a list of keys in the list. + */ + keys(): IterableIterator; + /** + * Returns a list of values in the list. + */ + values(): IterableIterator; +} + +interface Headers { + [Symbol.iterator](): IterableIterator<[string, string]>; + /** + * Returns an iterator allowing to go through all key/value pairs contained in this object. + */ + entries(): IterableIterator<[string, string]>; + /** + * Returns an iterator allowing to go through all keys of the key/value pairs contained in this object. + */ + keys(): IterableIterator; + /** + * Returns an iterator allowing to go through all values of the key/value pairs contained in this object. + */ + values(): IterableIterator; +} + +interface IDBDatabase { + /** + * Returns a new transaction with the given mode ("readonly" or "readwrite") and scope which can be a single object store name or an array of names. + */ + transaction(storeNames: string | Iterable, mode?: IDBTransactionMode): IDBTransaction; +} + +interface IDBObjectStore { + /** + * Creates a new index in store with the given name, keyPath and options and returns a new IDBIndex. If the keyPath and options define constraints that cannot be satisfied with the data already in store the upgrade transaction will abort with a "ConstraintError" DOMException. + * + * Throws an "InvalidStateError" DOMException if not called within an upgrade transaction. + */ + createIndex(name: string, keyPath: string | Iterable, options?: IDBIndexParameters): IDBIndex; +} + +interface URLSearchParams { + [Symbol.iterator](): IterableIterator<[string, string]>; + /** + * Returns an array of key, value pairs for every entry in the search params. + */ + entries(): IterableIterator<[string, string]>; + /** + * Returns a list of keys in the search params. + */ + keys(): IterableIterator; + /** + * Returns a list of values in the search params. + */ + values(): IterableIterator; +} + +interface WEBGL_draw_buffers { + drawBuffersWEBGL(buffers: Iterable): void; +} + +interface WebGL2RenderingContextBase { + clearBufferfv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: GLuint): void; + clearBufferiv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: GLuint): void; + clearBufferuiv(buffer: GLenum, drawbuffer: GLint, values: Iterable, srcOffset?: GLuint): void; + drawBuffers(buffers: Iterable): void; + getActiveUniforms(program: WebGLProgram, uniformIndices: Iterable, pname: GLenum): any; + getUniformIndices(program: WebGLProgram, uniformNames: Iterable): Iterable | null; + invalidateFramebuffer(target: GLenum, attachments: Iterable): void; + invalidateSubFramebuffer(target: GLenum, attachments: Iterable, x: GLint, y: GLint, width: GLsizei, height: GLsizei): void; + transformFeedbackVaryings(program: WebGLProgram, varyings: Iterable, bufferMode: GLenum): void; + uniform1uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4uiv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3x4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4x2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4x3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + vertexAttribI4iv(index: GLuint, values: Iterable): void; + vertexAttribI4uiv(index: GLuint, values: Iterable): void; +} + +interface WebGL2RenderingContextOverloads { + uniform1fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform1iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform2iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform3iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4fv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniform4iv(location: WebGLUniformLocation | null, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, data: Iterable, srcOffset?: GLuint, srcLength?: GLuint): void; +} + +interface WebGLRenderingContextBase { + vertexAttrib1fv(index: GLuint, values: Iterable): void; + vertexAttrib2fv(index: GLuint, values: Iterable): void; + vertexAttrib3fv(index: GLuint, values: Iterable): void; + vertexAttrib4fv(index: GLuint, values: Iterable): void; +} + +interface WebGLRenderingContextOverloads { + uniform1fv(location: WebGLUniformLocation | null, v: Iterable): void; + uniform1iv(location: WebGLUniformLocation | null, v: Iterable): void; + uniform2fv(location: WebGLUniformLocation | null, v: Iterable): void; + uniform2iv(location: WebGLUniformLocation | null, v: Iterable): void; + uniform3fv(location: WebGLUniformLocation | null, v: Iterable): void; + uniform3iv(location: WebGLUniformLocation | null, v: Iterable): void; + uniform4fv(location: WebGLUniformLocation | null, v: Iterable): void; + uniform4iv(location: WebGLUniformLocation | null, v: Iterable): void; + uniformMatrix2fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; + uniformMatrix3fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; + uniformMatrix4fv(location: WebGLUniformLocation | null, transpose: GLboolean, value: Iterable): void; +} diff --git a/src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl index cfeae3adf03..f7aae25d435 100644 --- a/src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/chs/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -1416,6 +1416,24 @@ + + + + + + + + + + + + + + + + + + @@ -1479,15 +1497,6 @@ - - - - - - - - - @@ -1499,10 +1508,13 @@ - + - + + + + @@ -1787,10 +1799,13 @@ - + - + + + + @@ -2166,6 +2181,15 @@ + + + + + + + + + @@ -2394,6 +2418,15 @@ + + + + + + + + + @@ -2597,9 +2630,21 @@ - + - + + + + + + + + + + + + + @@ -3369,6 +3414,24 @@ + + + + + + + + + + + + + + + + + + @@ -3405,6 +3468,15 @@ + + + + + + + + + @@ -3486,6 +3558,15 @@ + + + + + + + + + @@ -3675,6 +3756,15 @@ + + + + + + + + + @@ -3729,6 +3819,15 @@ + + + + + + + + + @@ -3747,6 +3846,15 @@ + + + + + + + + + @@ -3849,6 +3957,24 @@ + + + + + + + + + + + + + + + + + + @@ -3951,15 +4077,6 @@ - - - - - - - - - @@ -4116,6 +4233,15 @@ + + + + + + + + + @@ -4400,10 +4526,13 @@ - + - + + + + @@ -4779,6 +4908,15 @@ + + + + + + + + + @@ -5484,6 +5622,24 @@ + + + + + + + + + + + + + + + + + + @@ -5529,6 +5685,15 @@ + + + + + + + + + @@ -5946,6 +6111,15 @@ + + + + + + + + + @@ -6637,7 +6811,7 @@ - + @@ -6760,7 +6934,7 @@ - + @@ -6837,15 +7011,6 @@ - - - - - - - - - @@ -7167,6 +7332,15 @@ + + + + + + + + + @@ -7485,6 +7659,15 @@ + + + + + + + + + @@ -7557,15 +7740,6 @@ - - - - - - - - - @@ -8162,10 +8336,13 @@ - + - + + + + @@ -8399,10 +8576,13 @@ - + - + + + + @@ -8658,6 +8838,15 @@ + + + + + + + + + @@ -9804,6 +9993,15 @@ + + + + + + + + + @@ -10176,6 +10374,15 @@ + + + + + + + + + @@ -10341,6 +10548,15 @@ + + + + + + + + + @@ -10359,6 +10575,15 @@ + + + + + + + + + @@ -10972,7 +11197,7 @@ - + @@ -11745,6 +11970,15 @@ + + + + + + + + + @@ -12393,6 +12627,15 @@ + + + + + + + + + @@ -12456,6 +12699,15 @@ + + + + + + + + + @@ -12564,6 +12816,15 @@ + + + + + + + + + @@ -12710,10 +12971,13 @@ - + - + + + + @@ -12753,6 +13017,15 @@ + + + + + + + + + @@ -13086,6 +13359,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl index d0cc8686749..5ad3dcb22fc 100644 --- a/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/cht/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -1416,6 +1416,24 @@ + + + + + + + + + + + + + + + + + + @@ -1479,15 +1497,6 @@ - - - - - - - - - @@ -1499,10 +1508,13 @@ - + - + + + + @@ -1787,10 +1799,13 @@ - + - + + + + @@ -2166,6 +2181,15 @@ + + + + + + + + + @@ -2394,6 +2418,15 @@ + + + + + + + + + @@ -2597,9 +2630,21 @@ - + - + + + + + + + + + + + + + @@ -3369,6 +3414,24 @@ + + + + + + + + + + + + + + + + + + @@ -3405,6 +3468,15 @@ + + + + + + + + + @@ -3486,6 +3558,15 @@ + + + + + + + + + @@ -3675,6 +3756,15 @@ + + + + + + + + + @@ -3729,6 +3819,15 @@ + + + + + + + + + @@ -3747,6 +3846,15 @@ + + + + + + + + + @@ -3849,6 +3957,24 @@ + + + + + + + + + + + + + + + + + + @@ -3951,15 +4077,6 @@ - - - - - - - - - @@ -4116,6 +4233,15 @@ + + + + + + + + + @@ -4400,10 +4526,13 @@ - + - + + + + @@ -4779,6 +4908,15 @@ + + + + + + + + + @@ -5484,6 +5622,24 @@ + + + + + + + + + + + + + + + + + + @@ -5529,6 +5685,15 @@ + + + + + + + + + @@ -5946,6 +6111,15 @@ + + + + + + + + + @@ -6837,15 +7011,6 @@ - - - - - - - - - @@ -7167,6 +7332,15 @@ + + + + + + + + + @@ -7485,6 +7659,15 @@ + + + + + + + + + @@ -7557,15 +7740,6 @@ - - - - - - - - - @@ -8162,10 +8336,13 @@ - + - + + + + @@ -8399,10 +8576,13 @@ - + - + + + + @@ -8658,6 +8838,15 @@ + + + + + + + + + @@ -9804,6 +9993,15 @@ + + + + + + + + + @@ -10027,7 +10225,7 @@ - + @@ -10176,6 +10374,15 @@ + + + + + + + + + @@ -10341,6 +10548,15 @@ + + + + + + + + + @@ -10359,6 +10575,15 @@ + + + + + + + + + @@ -10972,7 +11197,7 @@ - + @@ -11745,6 +11970,15 @@ + + + + + + + + + @@ -12393,6 +12627,15 @@ + + + + + + + + + @@ -12456,6 +12699,15 @@ + + + + + + + + + @@ -12564,6 +12816,15 @@ + + + + + + + + + @@ -12710,10 +12971,13 @@ - + - + + + + @@ -12753,6 +13017,15 @@ + + + + + + + + + @@ -13086,6 +13359,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl index 0828ca494f8..8141958f47a 100644 --- a/src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/csy/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -1425,6 +1425,24 @@ + + + + + + + + + + + + + + + + + + @@ -1488,15 +1506,6 @@ - - - - - - - - - @@ -1508,10 +1517,13 @@ - + + + + @@ -1796,10 +1808,13 @@ - + + + + @@ -2175,6 +2190,15 @@ + + + + + + + + + @@ -2403,6 +2427,15 @@ + + + + + + + + + @@ -2606,10 +2639,22 @@ - + + + + + + + + + + + + + @@ -3378,6 +3423,24 @@ + + + + + + + + + + + + + + + + + + @@ -3414,6 +3477,15 @@ + + + + + + + + + @@ -3495,6 +3567,15 @@ + + + + + + + + + @@ -3684,6 +3765,15 @@ + + + + + + + + + @@ -3738,6 +3828,15 @@ + + + + + + + + + @@ -3756,6 +3855,15 @@ + + + + + + + + + @@ -3858,6 +3966,24 @@ + + + + + + + + + + + + + + + + + + @@ -3960,15 +4086,6 @@ - - - - - - - - - @@ -4125,6 +4242,15 @@ + + + + + + + + + @@ -4409,10 +4535,13 @@ - + + + + @@ -4788,6 +4917,15 @@ + + + + + + + + + @@ -5493,6 +5631,24 @@ + + + + + + + + + + + + + + + + + + @@ -5538,6 +5694,15 @@ + + + + + + + + + @@ -5955,6 +6120,15 @@ + + + + + + + + + @@ -6846,15 +7020,6 @@ - - - - - - - - - @@ -7176,6 +7341,15 @@ + + + + + + + + + @@ -7494,6 +7668,15 @@ + + + + + + + + + @@ -7566,15 +7749,6 @@ - - - - - - - - - @@ -8171,10 +8345,13 @@ - + + + + @@ -8408,10 +8585,13 @@ - + + + + @@ -8667,6 +8847,15 @@ + + + + + + + + + @@ -9813,6 +10002,15 @@ + + + + + + + + + @@ -10185,6 +10383,15 @@ + + + + + + + + + @@ -10350,6 +10557,15 @@ + + + + + + + + + @@ -10368,6 +10584,15 @@ + + + + + + + + + @@ -11754,6 +11979,15 @@ + + + + + + + + + @@ -12402,6 +12636,15 @@ + + + + + + + + + @@ -12465,6 +12708,15 @@ + + + + + + + + + @@ -12573,6 +12825,15 @@ + + + + + + + + + @@ -12719,10 +12980,13 @@ - + + + + @@ -12762,6 +13026,15 @@ + + + + + + + + + @@ -13095,6 +13368,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl index 2f49c14009b..cff77947013 100644 --- a/src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/deu/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -1413,6 +1413,24 @@ + + + + + + + + + + + + + + + + + + @@ -1476,15 +1494,6 @@ - - - - - - - - - @@ -1496,10 +1505,13 @@ - + + + + @@ -1784,10 +1796,13 @@ - + + + + @@ -2163,6 +2178,15 @@ + + + + + + + + + @@ -2391,6 +2415,15 @@ + + + + + + + + + @@ -2594,10 +2627,22 @@ - + + + + + + + + + + + + + @@ -3366,6 +3411,24 @@ + + + + + + + + + + + + + + + + + + @@ -3402,6 +3465,15 @@ + + + + + + + + + @@ -3483,6 +3555,15 @@ + + + + + + + + + @@ -3672,6 +3753,15 @@ + + + + + + + + + @@ -3726,6 +3816,15 @@ + + + + + + + + + @@ -3744,6 +3843,15 @@ + + + + + + + + + @@ -3846,6 +3954,24 @@ + + + + + + + + + + + + + + + + + + @@ -3948,15 +4074,6 @@ - - - - - - - - - @@ -4113,6 +4230,15 @@ + + + + + + + + + @@ -4397,10 +4523,13 @@ - + - + + + + @@ -4776,6 +4905,15 @@ + + + + + + + + + @@ -5481,6 +5619,24 @@ + + + + + + + + + + + + + + + + + + @@ -5526,6 +5682,15 @@ + + + + + + + + + @@ -5943,6 +6108,15 @@ + + + + + + + + + @@ -6834,15 +7008,6 @@ - - - - - - - - - @@ -7164,6 +7329,15 @@ + + + + + + + + + @@ -7482,6 +7656,15 @@ + + + + + + + + + @@ -7554,15 +7737,6 @@ - - - - - - - - - @@ -8156,10 +8330,13 @@ - + + + + @@ -8393,10 +8570,13 @@ - + + + + @@ -8652,6 +8832,15 @@ + + + + + + + + + @@ -9798,6 +9987,15 @@ + + + + + + + + + @@ -10170,6 +10368,15 @@ + + + + + + + + + @@ -10335,6 +10542,15 @@ + + + + + + + + + @@ -10353,6 +10569,15 @@ + + + + + + + + + @@ -11739,6 +11964,15 @@ + + + + + + + + + @@ -12387,6 +12621,15 @@ + + + + + + + + + @@ -12450,6 +12693,15 @@ + + + + + + + + + @@ -12558,6 +12810,15 @@ + + + + + + + + + @@ -12704,10 +12965,13 @@ - + + + + @@ -12747,6 +13011,15 @@ + + + + + + + + + @@ -13080,6 +13353,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl index c33d53f7534..739807d4e85 100644 --- a/src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/esn/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -1428,6 +1428,24 @@ + + + + + + + + + + + + + + + + + + @@ -1491,15 +1509,6 @@ - - - - - - - - - @@ -1511,10 +1520,13 @@ - + + + + @@ -1799,10 +1811,13 @@ - + + + + @@ -2178,6 +2193,15 @@ + + + + + + + + + @@ -2406,6 +2430,15 @@ + + + + + + + + + @@ -2609,10 +2642,22 @@ - + + + + + + + + + + + + + @@ -3381,6 +3426,24 @@ + + + + + + + + + + + + + + + + + + @@ -3417,6 +3480,15 @@ + + + + + + + + + @@ -3498,6 +3570,15 @@ + + + + + + + + + @@ -3687,6 +3768,15 @@ + + + + + + + + + @@ -3741,6 +3831,15 @@ + + + + + + + + + @@ -3759,6 +3858,15 @@ + + + + + + + + + @@ -3861,6 +3969,24 @@ + + + + + + + + + + + + + + + + + + @@ -3963,15 +4089,6 @@ - - - - - - - - - @@ -4128,6 +4245,15 @@ + + + + + + + + + @@ -4412,10 +4538,13 @@ - + - + + + + @@ -4791,6 +4920,15 @@ + + + + + + + + + @@ -5496,6 +5634,24 @@ + + + + + + + + + + + + + + + + + + @@ -5541,6 +5697,15 @@ + + + + + + + + + @@ -5958,6 +6123,15 @@ + + + + + + + + + @@ -6849,15 +7023,6 @@ - - - - - - - - - @@ -7179,6 +7344,15 @@ + + + + + + + + + @@ -7497,6 +7671,15 @@ + + + + + + + + + @@ -7569,15 +7752,6 @@ - - - - - - - - - @@ -8174,10 +8348,13 @@ - + + + + @@ -8411,10 +8588,13 @@ - + + + + @@ -8670,6 +8850,15 @@ + + + + + + + + + @@ -8962,7 +9151,7 @@ - + @@ -8971,7 +9160,7 @@ - + @@ -9816,6 +10005,15 @@ + + + + + + + + + @@ -10039,7 +10237,7 @@ - + @@ -10188,6 +10386,15 @@ + + + + + + + + + @@ -10353,6 +10560,15 @@ + + + + + + + + + @@ -10371,6 +10587,15 @@ + + + + + + + + + @@ -11757,6 +11982,15 @@ + + + + + + + + + @@ -12405,6 +12639,15 @@ + + + + + + + + + @@ -12468,6 +12711,15 @@ + + + + + + + + + @@ -12576,6 +12828,15 @@ + + + + + + + + + @@ -12722,10 +12983,13 @@ - + + + + @@ -12765,6 +13029,15 @@ + + + + + + + + + @@ -13098,6 +13371,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl index 8c96e820e2d..39f8406edef 100644 --- a/src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/fra/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -1428,6 +1428,24 @@ + + + + + + + + + + + + + + + + + + @@ -1491,15 +1509,6 @@ - - - - - - - - - @@ -1511,10 +1520,13 @@ - + - + + + + @@ -1799,10 +1811,13 @@ - + - + + + + @@ -2178,6 +2193,15 @@ + + + + + + + + + @@ -2406,6 +2430,15 @@ + + + + + + + + + @@ -2609,9 +2642,21 @@ - + - + + + + + + + + + + + + + @@ -3381,6 +3426,24 @@ + + + + + + + + + + + + + + + + + + @@ -3417,6 +3480,15 @@ + + + + + + + + + @@ -3498,6 +3570,15 @@ + + + + + + + + + @@ -3687,6 +3768,15 @@ + + + + + + + + + @@ -3741,6 +3831,15 @@ + + + + + + + + + @@ -3759,6 +3858,15 @@ + + + + + + + + + @@ -3861,6 +3969,24 @@ + + + + + + + + + + + + + + + + + + @@ -3963,15 +4089,6 @@ - - - - - - - - - @@ -4128,6 +4245,15 @@ + + + + + + + + + @@ -4412,10 +4538,13 @@ - + - + + + + @@ -4791,6 +4920,15 @@ + + + + + + + + + @@ -5496,6 +5634,24 @@ + + + + + + + + + + + + + + + + + + @@ -5541,6 +5697,15 @@ + + + + + + + + + @@ -5958,6 +6123,15 @@ + + + + + + + + + @@ -6849,15 +7023,6 @@ - - - - - - - - - @@ -7179,6 +7344,15 @@ + + + + + + + + + @@ -7497,6 +7671,15 @@ + + + + + + + + + @@ -7569,15 +7752,6 @@ - - - - - - - - - @@ -8174,10 +8348,13 @@ - + - + + + + @@ -8411,10 +8588,13 @@ - + - + + + + @@ -8670,6 +8850,15 @@ + + + + + + + + + @@ -8962,7 +9151,7 @@ - + @@ -9816,6 +10005,15 @@ + + + + + + + + + @@ -10188,6 +10386,15 @@ + + + + + + + + + @@ -10353,6 +10560,15 @@ + + + + + + + + + @@ -10371,6 +10587,15 @@ + + + + + + + + + @@ -11757,6 +11982,15 @@ + + + + + + + + + @@ -12405,6 +12639,15 @@ + + + + + + + + + @@ -12468,6 +12711,15 @@ + + + + + + + + + @@ -12576,6 +12828,15 @@ + + + + + + + + + @@ -12722,10 +12983,13 @@ - + - + + + + @@ -12765,6 +13029,15 @@ + + + + + + + + + @@ -13098,6 +13371,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl index ca652f03e6a..8c9e61fa705 100644 --- a/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/ita/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -1416,6 +1416,24 @@ + + + + + + + + + + + + + + + + + + @@ -1479,15 +1497,6 @@ - - - - - - - - - @@ -1499,10 +1508,13 @@ - + - + + + + @@ -1787,10 +1799,13 @@ - + - + + + + @@ -2166,6 +2181,15 @@ + + + + + + + + + @@ -2394,6 +2418,15 @@ + + + + + + + + + @@ -2597,9 +2630,21 @@ - + - + + + + + + + + + + + + + @@ -3369,6 +3414,24 @@ + + + + + + + + + + + + + + + + + + @@ -3405,6 +3468,15 @@ + + + + + + + + + @@ -3486,6 +3558,15 @@ + + + + + + + + + @@ -3675,6 +3756,15 @@ + + + + + + + + + @@ -3729,6 +3819,15 @@ + + + + + + + + + @@ -3747,6 +3846,15 @@ + + + + + + + + + @@ -3849,6 +3957,24 @@ + + + + + + + + + + + + + + + + + + @@ -3951,15 +4077,6 @@ - - - - - - - - - @@ -4116,6 +4233,15 @@ + + + + + + + + + @@ -4400,10 +4526,13 @@ - + - + + + + @@ -4779,6 +4908,15 @@ + + + + + + + + + @@ -5484,6 +5622,24 @@ + + + + + + + + + + + + + + + + + + @@ -5529,6 +5685,15 @@ + + + + + + + + + @@ -5946,6 +6111,15 @@ + + + + + + + + + @@ -6837,15 +7011,6 @@ - - - - - - - - - @@ -7167,6 +7332,15 @@ + + + + + + + + + @@ -7485,6 +7659,15 @@ + + + + + + + + + @@ -7557,15 +7740,6 @@ - - - - - - - - - @@ -8162,10 +8336,13 @@ - + - + + + + @@ -8399,10 +8576,13 @@ - + - + + + + @@ -8658,6 +8838,15 @@ + + + + + + + + + @@ -9804,6 +9993,15 @@ + + + + + + + + + @@ -10176,6 +10374,15 @@ + + + + + + + + + @@ -10341,6 +10548,15 @@ + + + + + + + + + @@ -10359,6 +10575,15 @@ + + + + + + + + + @@ -11745,6 +11970,15 @@ + + + + + + + + + @@ -12393,6 +12627,15 @@ + + + + + + + + + @@ -12456,6 +12699,15 @@ + + + + + + + + + @@ -12564,6 +12816,15 @@ + + + + + + + + + @@ -12710,10 +12971,13 @@ - + - + + + + @@ -12753,6 +13017,15 @@ + + + + + + + + + @@ -13086,6 +13359,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl index 91641a1b9f8..e455e2c7cad 100644 --- a/src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/jpn/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -1416,6 +1416,24 @@ + + + + + + + + + + + + + + + + + + @@ -1479,15 +1497,6 @@ - - - - - - - - - @@ -1499,10 +1508,13 @@ - + - + + + + @@ -1787,10 +1799,13 @@ - + - + + + + @@ -2166,6 +2181,15 @@ + + + + + + + + + @@ -2394,6 +2418,15 @@ + + + + + + + + + @@ -2597,9 +2630,21 @@ - + - + + + + + + + + + + + + + @@ -3369,6 +3414,24 @@ + + + + + + + + + + + + + + + + + + @@ -3405,6 +3468,15 @@ + + + + + + + + + @@ -3486,6 +3558,15 @@ + + + + + + + + + @@ -3675,6 +3756,15 @@ + + + + + + + + + @@ -3729,6 +3819,15 @@ + + + + + + + + + @@ -3747,6 +3846,15 @@ + + + + + + + + + @@ -3849,6 +3957,24 @@ + + + + + + + + + + + + + + + + + + @@ -3951,15 +4077,6 @@ - - - - - - - - - @@ -4116,6 +4233,15 @@ + + + + + + + + + @@ -4400,10 +4526,13 @@ - + - + + + + @@ -4779,6 +4908,15 @@ + + + + + + + + + @@ -5484,6 +5622,24 @@ + + + + + + + + + + + + + + + + + + @@ -5529,6 +5685,15 @@ + + + + + + + + + @@ -5946,6 +6111,15 @@ + + + + + + + + + @@ -6837,15 +7011,6 @@ - - - - - - - - - @@ -7167,6 +7332,15 @@ + + + + + + + + + @@ -7485,6 +7659,15 @@ + + + + + + + + + @@ -7557,15 +7740,6 @@ - - - - - - - - - @@ -8162,10 +8336,13 @@ - + - + + + + @@ -8399,10 +8576,13 @@ - + - + + + + @@ -8658,6 +8838,15 @@ + + + + + + + + + @@ -8950,7 +9139,7 @@ - + @@ -8959,7 +9148,7 @@ - + @@ -9804,6 +9993,15 @@ + + + + + + + + + @@ -10027,7 +10225,7 @@ - + @@ -10176,6 +10374,15 @@ + + + + + + + + + @@ -10341,6 +10548,15 @@ + + + + + + + + + @@ -10359,6 +10575,15 @@ + + + + + + + + + @@ -11745,6 +11970,15 @@ + + + + + + + + + @@ -12393,6 +12627,15 @@ + + + + + + + + + @@ -12456,6 +12699,15 @@ + + + + + + + + + @@ -12564,6 +12816,15 @@ + + + + + + + + + @@ -12710,10 +12971,13 @@ - + - + + + + @@ -12753,6 +13017,15 @@ + + + + + + + + + @@ -13086,6 +13359,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl index 5343f95b25b..49c210cc4a5 100644 --- a/src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/kor/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -1416,6 +1416,24 @@ + + + + + + + + + + + + + + + + + + @@ -1479,15 +1497,6 @@ - - - - - - - - - @@ -1499,10 +1508,13 @@ - + + + + @@ -1787,10 +1799,13 @@ - + + + + @@ -2166,6 +2181,15 @@ + + + + + + + + + @@ -2394,6 +2418,15 @@ + + + + + + + + + @@ -2597,10 +2630,22 @@ - + + + + + + + + + + + + + @@ -3369,6 +3414,24 @@ + + + + + + + + + + + + + + + + + + @@ -3405,6 +3468,15 @@ + + + + + + + + + @@ -3486,6 +3558,15 @@ + + + + + + + + + @@ -3675,6 +3756,15 @@ + + + + + + + + + @@ -3729,6 +3819,15 @@ + + + + + + + + + @@ -3747,6 +3846,15 @@ + + + + + + + + + @@ -3849,6 +3957,24 @@ + + + + + + + + + + + + + + + + + + @@ -3951,15 +4077,6 @@ - - - - - - - - - @@ -4116,6 +4233,15 @@ + + + + + + + + + @@ -4400,10 +4526,13 @@ - + + + + @@ -4779,6 +4908,15 @@ + + + + + + + + + @@ -5484,6 +5622,24 @@ + + + + + + + + + + + + + + + + + + @@ -5529,6 +5685,15 @@ + + + + + + + + + @@ -5946,6 +6111,15 @@ + + + + + + + + + @@ -6837,15 +7011,6 @@ - - - - - - - - - @@ -7167,6 +7332,15 @@ + + + + + + + + + @@ -7485,6 +7659,15 @@ + + + + + + + + + @@ -7557,15 +7740,6 @@ - - - - - - - - - @@ -8162,10 +8336,13 @@ - + + + + @@ -8399,10 +8576,13 @@ - + - + + + + @@ -8658,6 +8838,15 @@ + + + + + + + + + @@ -9804,6 +9993,15 @@ + + + + + + + + + @@ -10176,6 +10374,15 @@ + + + + + + + + + @@ -10341,6 +10548,15 @@ + + + + + + + + + @@ -10359,6 +10575,15 @@ + + + + + + + + + @@ -11745,6 +11970,15 @@ + + + + + + + + + @@ -12393,6 +12627,15 @@ + + + + + + + + + @@ -12456,6 +12699,15 @@ + + + + + + + + + @@ -12564,6 +12816,15 @@ + + + + + + + + + @@ -12710,10 +12971,13 @@ - + + + + @@ -12753,6 +13017,15 @@ + + + + + + + + + @@ -13086,6 +13359,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl index 724757bfb9a..cf10e53dd1e 100644 --- a/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/plk/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -1406,6 +1406,24 @@ + + + + + + + + + + + + + + + + + + @@ -1469,15 +1487,6 @@ - - - - - - - - - @@ -1489,10 +1498,13 @@ - + - + + + + @@ -1777,10 +1789,13 @@ - + - + + + + @@ -2156,6 +2171,15 @@ + + + + + + + + + @@ -2384,6 +2408,15 @@ + + + + + + + + + @@ -2587,9 +2620,21 @@ - + - + + + + + + + + + + + + + @@ -3359,6 +3404,24 @@ + + + + + + + + + + + + + + + + + + @@ -3395,6 +3458,15 @@ + + + + + + + + + @@ -3476,6 +3548,15 @@ + + + + + + + + + @@ -3665,6 +3746,15 @@ + + + + + + + + + @@ -3719,6 +3809,15 @@ + + + + + + + + + @@ -3737,6 +3836,15 @@ + + + + + + + + + @@ -3839,6 +3947,24 @@ + + + + + + + + + + + + + + + + + + @@ -3941,15 +4067,6 @@ - - - - - - - - - @@ -4106,6 +4223,15 @@ + + + + + + + + + @@ -4390,10 +4516,13 @@ - + - + + + + @@ -4769,6 +4898,15 @@ + + + + + + + + + @@ -5474,6 +5612,24 @@ + + + + + + + + + + + + + + + + + + @@ -5519,6 +5675,15 @@ + + + + + + + + + @@ -5936,6 +6101,15 @@ + + + + + + + + + @@ -6827,15 +7001,6 @@ - - - - - - - - - @@ -7157,6 +7322,15 @@ + + + + + + + + + @@ -7475,6 +7649,15 @@ + + + + + + + + + @@ -7547,15 +7730,6 @@ - - - - - - - - - @@ -8149,10 +8323,13 @@ - + - + + + + @@ -8386,10 +8563,13 @@ - + - + + + + @@ -8645,6 +8825,15 @@ + + + + + + + + + @@ -9791,6 +9980,15 @@ + + + + + + + + + @@ -10082,6 +10280,15 @@ + + + + + + + + + @@ -10163,6 +10370,15 @@ + + + + + + + + + @@ -10328,6 +10544,15 @@ + + + + + + + + + @@ -10346,6 +10571,15 @@ + + + + + + + + + @@ -11732,6 +11966,15 @@ + + + + + + + + + @@ -12380,6 +12623,15 @@ + + + + + + + + + @@ -12443,6 +12695,15 @@ + + + + + + + + + @@ -12551,6 +12812,15 @@ + + + + + + + + + @@ -12697,10 +12967,13 @@ - + + + + @@ -12740,6 +13013,15 @@ + + + + + + + + + @@ -13073,6 +13355,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl index aae8694a00a..96c5d04adea 100644 --- a/src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/ptb/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -1409,6 +1409,24 @@ + + + + + + + + + + + + + + + + + + @@ -1472,15 +1490,6 @@ - - - - - - - - - @@ -1492,10 +1501,13 @@ - + - + + + + @@ -1780,10 +1792,13 @@ - + - + + + + @@ -2159,6 +2174,15 @@ + + + + + + + + + @@ -2387,6 +2411,15 @@ + + + + + + + + + @@ -2590,9 +2623,21 @@ - + - + + + + + + + + + + + + + @@ -3362,6 +3407,24 @@ + + + + + + + + + + + + + + + + + + @@ -3398,6 +3461,15 @@ + + + + + + + + + @@ -3479,6 +3551,15 @@ + + + + + + + + + @@ -3668,6 +3749,15 @@ + + + + + + + + + @@ -3722,6 +3812,15 @@ + + + + + + + + + @@ -3740,6 +3839,15 @@ + + + + + + + + + @@ -3842,6 +3950,24 @@ + + + + + + + + + + + + + + + + + + @@ -3944,15 +4070,6 @@ - - - - - - - - - @@ -4109,6 +4226,15 @@ + + + + + + + + + @@ -4393,10 +4519,13 @@ - + - + + + + @@ -4772,6 +4901,15 @@ + + + + + + + + + @@ -5477,6 +5615,24 @@ + + + + + + + + + + + + + + + + + + @@ -5522,6 +5678,15 @@ + + + + + + + + + @@ -5939,6 +6104,15 @@ + + + + + + + + + @@ -6830,15 +7004,6 @@ - - - - - - - - - @@ -7160,6 +7325,15 @@ + + + + + + + + + @@ -7478,6 +7652,15 @@ + + + + + + + + + @@ -7550,15 +7733,6 @@ - - - - - - - - - @@ -8152,10 +8326,13 @@ - + - + + + + @@ -8389,10 +8566,13 @@ - + - + + + + @@ -8648,6 +8828,15 @@ + + + + + + + + + @@ -9794,6 +9983,15 @@ + + + + + + + + + @@ -10053,7 +10251,7 @@ - + @@ -10085,6 +10283,15 @@ + + + + + + + + + @@ -10166,6 +10373,15 @@ + + + + + + + + + @@ -10331,6 +10547,15 @@ + + + + + + + + + @@ -10349,6 +10574,15 @@ + + + + + + + + + @@ -11735,6 +11969,15 @@ + + + + + + + + + @@ -12383,6 +12626,15 @@ + + + + + + + + + @@ -12446,6 +12698,15 @@ + + + + + + + + + @@ -12554,6 +12815,15 @@ + + + + + + + + + @@ -12700,10 +12970,13 @@ - + - + + + + @@ -12743,6 +13016,15 @@ + + + + + + + + + @@ -13076,6 +13358,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl index 1fb77c996e4..c2917002e77 100644 --- a/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/rus/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -1415,6 +1415,24 @@ + + + + + + + + + + + + + + + + + + @@ -1478,15 +1496,6 @@ - - - - - - - - - @@ -1498,10 +1507,13 @@ - + - + + + + @@ -1786,10 +1798,13 @@ - + - + + + + @@ -2165,6 +2180,15 @@ + + + + + + + + + @@ -2393,6 +2417,15 @@ + + + + + + + + + @@ -2596,9 +2629,21 @@ - + - + + + + + + + + + + + + + @@ -3368,6 +3413,24 @@ + + + + + + + + + + + + + + + + + + @@ -3404,6 +3467,15 @@ + + + + + + + + + @@ -3485,6 +3557,15 @@ + + + + + + + + + @@ -3674,6 +3755,15 @@ + + + + + + + + + @@ -3728,6 +3818,15 @@ + + + + + + + + + @@ -3746,6 +3845,15 @@ + + + + + + + + + @@ -3848,6 +3956,24 @@ + + + + + + + + + + + + + + + + + + @@ -3950,15 +4076,6 @@ - - - - - - - - - @@ -4115,6 +4232,15 @@ + + + + + + + + + @@ -4399,10 +4525,13 @@ - + - + + + + @@ -4778,6 +4907,15 @@ + + + + + + + + + @@ -5483,6 +5621,24 @@ + + + + + + + + + + + + + + + + + + @@ -5528,6 +5684,15 @@ + + + + + + + + + @@ -5945,6 +6110,15 @@ + + + + + + + + + @@ -6836,15 +7010,6 @@ - - - - - - - - - @@ -7166,6 +7331,15 @@ + + + + + + + + + @@ -7484,6 +7658,15 @@ + + + + + + + + + @@ -7556,15 +7739,6 @@ - - - - - - - - - @@ -8161,10 +8335,13 @@ - + - + + + + @@ -8398,10 +8575,13 @@ - + - + + + + @@ -8657,6 +8837,15 @@ + + + + + + + + + @@ -8949,7 +9138,7 @@ - + @@ -8958,7 +9147,7 @@ - + @@ -9803,6 +9992,15 @@ + + + + + + + + + @@ -10026,7 +10224,7 @@ - + @@ -10175,6 +10373,15 @@ + + + + + + + + + @@ -10340,6 +10547,15 @@ + + + + + + + + + @@ -10358,6 +10574,15 @@ + + + + + + + + + @@ -11744,6 +11969,15 @@ + + + + + + + + + @@ -12392,6 +12626,15 @@ + + + + + + + + + @@ -12455,6 +12698,15 @@ + + + + + + + + + @@ -12563,6 +12815,15 @@ + + + + + + + + + @@ -12709,10 +12970,13 @@ - + - + + + + @@ -12752,6 +13016,15 @@ + + + + + + + + + @@ -13085,6 +13358,15 @@ + + + + + + + + + diff --git a/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl b/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl index 1a954a5afef..40e40bb389f 100644 --- a/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl +++ b/src/loc/lcl/trk/diagnosticMessages/diagnosticMessages.generated.json.lcl @@ -1409,6 +1409,24 @@ + + + + + + + + + + + + + + + + + + @@ -1472,15 +1490,6 @@ - - - - - - - - - @@ -1492,10 +1501,13 @@ - + - + + + + @@ -1780,10 +1792,13 @@ - + - + + + + @@ -2159,6 +2174,15 @@ + + + + + + + + + @@ -2387,6 +2411,15 @@ + + + + + + + + + @@ -2590,9 +2623,21 @@ - + - + + + + + + + + + + + + + @@ -3362,6 +3407,24 @@ + + + + + + + + + + + + + + + + + + @@ -3398,6 +3461,15 @@ + + + + + + + + + @@ -3479,6 +3551,15 @@ + + + + + + + + + @@ -3668,6 +3749,15 @@ + + + + + + + + + @@ -3722,6 +3812,15 @@ + + + + + + + + + @@ -3740,6 +3839,15 @@ + + + + + + + + + @@ -3842,6 +3950,24 @@ + + + + + + + + + + + + + + + + + + @@ -3944,15 +4070,6 @@ - - - - - - - - - @@ -4109,6 +4226,15 @@ + + + + + + + + + @@ -4393,10 +4519,13 @@ - + - + + + + @@ -4772,6 +4901,15 @@ + + + + + + + + + @@ -5477,6 +5615,24 @@ + + + + + + + + + + + + + + + + + + @@ -5522,6 +5678,15 @@ + + + + + + + + + @@ -5939,6 +6104,15 @@ + + + + + + + + + @@ -6830,15 +7004,6 @@ - - - - - - - - - @@ -7160,6 +7325,15 @@ + + + + + + + + + @@ -7478,6 +7652,15 @@ + + + + + + + + + @@ -7550,15 +7733,6 @@ - - - - - - - - - @@ -8155,10 +8329,13 @@ - + - + + + + @@ -8392,10 +8569,13 @@ - + - + + + + @@ -8651,6 +8831,15 @@ + + + + + + + + + @@ -9797,6 +9986,15 @@ + + + + + + + + + @@ -10169,6 +10367,15 @@ + + + + + + + + + @@ -10334,6 +10541,15 @@ + + + + + + + + + @@ -10352,6 +10568,15 @@ + + + + + + + + + @@ -11738,6 +11963,15 @@ + + + + + + + + + @@ -12386,6 +12620,15 @@ + + + + + + + + + @@ -12449,6 +12692,15 @@ + + + + + + + + + @@ -12557,6 +12809,15 @@ + + + + + + + + + @@ -12703,10 +12964,13 @@ - + - + + + + @@ -12746,6 +13010,15 @@ + + + + + + + + + @@ -13079,6 +13352,15 @@ + + + + + + + + + diff --git a/src/server/editorServices.ts b/src/server/editorServices.ts index 0c0dd41f351..d0b4891c963 100644 --- a/src/server/editorServices.ts +++ b/src/server/editorServices.ts @@ -396,7 +396,9 @@ namespace ts.server { pluginProbeLocations?: readonly string[]; allowLocalPluginLoads?: boolean; typesMapLocation?: string; + /** @deprecated use serverMode instead */ syntaxOnly?: boolean; + serverMode?: LanguageServiceMode; } interface OriginalFileInfo { fileName: NormalizedPath; path: Path; } @@ -432,34 +434,55 @@ namespace ts.server { /*@internal*/ export function forEachResolvedProjectReferenceProject( project: ConfiguredProject, - cb: (child: ConfiguredProject, configFileName: NormalizedPath) => T | undefined, - projectReferenceProjectLoadKind: ProjectReferenceProjectLoadKind.Find | ProjectReferenceProjectLoadKind.FindCreate + cb: (child: ConfiguredProject) => T | undefined, + projectReferenceProjectLoadKind: ProjectReferenceProjectLoadKind.Find | ProjectReferenceProjectLoadKind.FindCreate, ): T | undefined; /*@internal*/ export function forEachResolvedProjectReferenceProject( project: ConfiguredProject, - cb: (child: ConfiguredProject, configFileName: NormalizedPath) => T | undefined, - projectReferenceProjectLoadKind: ProjectReferenceProjectLoadKind.FindCreateLoad, + cb: (child: ConfiguredProject) => T | undefined, + projectReferenceProjectLoadKind: ProjectReferenceProjectLoadKind, reason: string ): T | undefined; export function forEachResolvedProjectReferenceProject( project: ConfiguredProject, - cb: (child: ConfiguredProject, configFileName: NormalizedPath) => T | undefined, + cb: (child: ConfiguredProject) => T | undefined, projectReferenceProjectLoadKind: ProjectReferenceProjectLoadKind, reason?: string ): T | undefined { - return forEachResolvedProjectReference(project, ref => { - if (!ref) return undefined; - const configFileName = toNormalizedPath(ref.sourceFile.fileName); - const child = project.projectService.findConfiguredProjectByProjectName(configFileName) || ( - projectReferenceProjectLoadKind === ProjectReferenceProjectLoadKind.FindCreate ? - project.projectService.createConfiguredProject(configFileName) : - projectReferenceProjectLoadKind === ProjectReferenceProjectLoadKind.FindCreateLoad ? - project.projectService.createAndLoadConfiguredProject(configFileName, reason!) : - undefined - ); - return child && cb(child, configFileName); - }); + let seenResolvedRefs: ESMap | undefined; + return worker(project.getCurrentProgram()?.getResolvedProjectReferences(), project.getCompilerOptions()); + + function worker(resolvedProjectReferences: readonly (ResolvedProjectReference | undefined)[] | undefined, parentOptions: CompilerOptions): T | undefined { + const loadKind = parentOptions.disableReferencedProjectLoad ? ProjectReferenceProjectLoadKind.Find : projectReferenceProjectLoadKind; + return forEach(resolvedProjectReferences, ref => { + if (!ref) return undefined; + + const configFileName = toNormalizedPath(ref.sourceFile.fileName); + const canonicalPath = project.projectService.toCanonicalFileName(configFileName); + const seenValue = seenResolvedRefs?.get(canonicalPath); + if (seenValue !== undefined && seenValue >= loadKind) { + return undefined; + } + const child = project.projectService.findConfiguredProjectByProjectName(configFileName) || ( + loadKind === ProjectReferenceProjectLoadKind.Find ? + undefined : + loadKind === ProjectReferenceProjectLoadKind.FindCreate ? + project.projectService.createConfiguredProject(configFileName) : + loadKind === ProjectReferenceProjectLoadKind.FindCreateLoad ? + project.projectService.createAndLoadConfiguredProject(configFileName, reason!) : + Debug.assertNever(loadKind) + ); + + const result = child && cb(child); + if (result) { + return result; + } + + (seenResolvedRefs || (seenResolvedRefs = new Map())).set(canonicalPath, loadKind); + return worker(ref.references, ref.commandLine.options); + }); + } } /*@internal*/ @@ -608,6 +631,8 @@ namespace ts.server { * Open files: with value being project root path, and key being Path of the file that is open */ readonly openFiles: Map = new Map(); + /* @internal */ + readonly configFileForOpenFiles: ESMap = new Map(); /** * Map of open files that are opened without complete path but have projectRoot as current directory */ @@ -660,7 +685,9 @@ namespace ts.server { public readonly typesMapLocation: string | undefined; - public readonly syntaxOnly?: boolean; + /** @deprecated use serverMode instead */ + public readonly syntaxOnly: boolean; + public readonly serverMode: LanguageServiceMode; /** Tracks projects that we have already sent telemetry for. */ private readonly seenProjects = new Map(); @@ -690,7 +717,18 @@ namespace ts.server { this.pluginProbeLocations = opts.pluginProbeLocations || emptyArray; this.allowLocalPluginLoads = !!opts.allowLocalPluginLoads; this.typesMapLocation = (opts.typesMapLocation === undefined) ? combinePaths(getDirectoryPath(this.getExecutingFilePath()), "typesMap.json") : opts.typesMapLocation; - this.syntaxOnly = opts.syntaxOnly; + if (opts.serverMode !== undefined) { + this.serverMode = opts.serverMode; + this.syntaxOnly = this.serverMode === LanguageServiceMode.Syntactic; + } + else if (opts.syntaxOnly) { + this.serverMode = LanguageServiceMode.Syntactic; + this.syntaxOnly = true; + } + else { + this.serverMode = LanguageServiceMode.Semantic; + this.syntaxOnly = false; + } Debug.assert(!!this.host.createHash, "'ServerHost.createHash' is required for ProjectService"); if (this.host.realpath) { @@ -726,7 +764,7 @@ namespace ts.server { this.logger.loggingEnabled() ? WatchLogLevel.TriggerOnly : WatchLogLevel.None; const log: (s: string) => void = watchLogLevel !== WatchLogLevel.None ? (s => this.logger.info(s)) : noop; this.packageJsonCache = createPackageJsonCache(this); - this.watchFactory = this.syntaxOnly ? + this.watchFactory = this.serverMode !== LanguageServiceMode.Semantic ? { watchFile: returnNoopFileWatcher, watchFilePath: returnNoopFileWatcher, @@ -1440,6 +1478,7 @@ namespace ts.server { } this.openFiles.delete(info.path); + this.configFileForOpenFiles.delete(info.path); if (!skipAssignOrphanScriptInfosToInferredProject && ensureProjectsForOpenFiles) { this.assignOrphanScriptInfosToInferredProject(); @@ -1703,7 +1742,7 @@ namespace ts.server { * the newly opened file. */ private forEachConfigFileLocation(info: OpenScriptInfoOrClosedOrConfigFileInfo, action: (configFileName: NormalizedPath, canonicalConfigFilePath: string) => boolean | void) { - if (this.syntaxOnly) { + if (this.serverMode !== LanguageServiceMode.Semantic) { return undefined; } @@ -1754,11 +1793,9 @@ namespace ts.server { const project = configFileName && this.findConfiguredProjectByProjectName(configFileName); - return project?.isSolution() ? - project.getDefaultChildProjectFromSolution(info) : - project && projectContainsInfoDirectly(project, info) ? - project : - undefined; + return project && projectContainsInfoDirectly(project, info) ? + project : + project?.getDefaultChildProjectFromProjectWithReferences(info); } /** @@ -1772,7 +1809,11 @@ namespace ts.server { * otherwise just file name */ private getConfigFileNameForFile(info: OpenScriptInfoOrClosedOrConfigFileInfo) { - if (isOpenScriptInfo(info)) Debug.assert(info.isScriptOpen()); + if (isOpenScriptInfo(info)) { + Debug.assert(info.isScriptOpen()); + const result = this.configFileForOpenFiles.get(info.path); + if (result !== undefined) return result || undefined; + } this.logger.info(`Search path: ${getDirectoryPath(info.fileName)}`); const configFileName = this.forEachConfigFileLocation(info, (configFileName, canonicalConfigFilePath) => this.configFileExists(configFileName, canonicalConfigFilePath, info)); @@ -1782,6 +1823,9 @@ namespace ts.server { else { this.logger.info(`For info: ${info.fileName} :: No config files found.`); } + if (isOpenScriptInfo(info)) { + this.configFileForOpenFiles.set(info.path, configFileName || false); + } return configFileName; } @@ -2152,14 +2196,14 @@ namespace ts.server { * Read the config file of the project again by clearing the cache and update the project graph */ /* @internal */ - reloadConfiguredProject(project: ConfiguredProject, reason: string) { + reloadConfiguredProject(project: ConfiguredProject, reason: string, isInitialLoad: boolean) { // At this point, there is no reason to not have configFile in the host const host = project.getCachedDirectoryStructureHost(); // Clear the cache since we are reloading the project from disk host.clearCache(); const configFileName = project.getConfigFilePath(); - this.logger.info(`Reloading configured project ${configFileName}`); + this.logger.info(`${isInitialLoad ? "Loading" : "Reloading"} configured project ${configFileName}`); // Load project from the disk this.loadConfiguredProject(project, reason); @@ -2773,8 +2817,16 @@ namespace ts.server { */ private reloadConfiguredProjectForFiles(openFiles: ESMap, delayReload: boolean, shouldReloadProjectFor: (openFileValue: T) => boolean, reason: string) { const updatedProjects = new Map(); + const reloadChildProject = (child: ConfiguredProject) => { + if (!updatedProjects.has(child.canonicalConfigFilePath)) { + updatedProjects.set(child.canonicalConfigFilePath, true); + this.reloadConfiguredProject(child, reason, /*isInitialLoad*/ false); + } + }; // try to reload config file for all open files openFiles.forEach((openFileValue, path) => { + // Invalidate default config file name for open file + this.configFileForOpenFiles.delete(path); // Filter out the files that need to be ignored if (!shouldReloadProjectFor(openFileValue)) { return; @@ -2798,20 +2850,25 @@ namespace ts.server { } else { // reload from the disk - this.reloadConfiguredProject(project, reason); - // If this is solution, reload the project till the reloaded project contains the script info directly - if (!project.containsScriptInfo(info) && project.isSolution()) { - forEachResolvedProjectReferenceProject( + this.reloadConfiguredProject(project, reason, /*isInitialLoad*/ false); + // If this project does not contain this file directly, reload the project till the reloaded project contains the script info directly + if (!projectContainsInfoDirectly(project, info)) { + const referencedProject = forEachResolvedProjectReferenceProject( project, child => { - if (!updatedProjects.has(child.canonicalConfigFilePath)) { - updatedProjects.set(child.canonicalConfigFilePath, true); - this.reloadConfiguredProject(child, reason); - } + reloadChildProject(child); return projectContainsInfoDirectly(child, info); }, ProjectReferenceProjectLoadKind.FindCreate ); + if (referencedProject) { + // Reload the project's tree that is already present + forEachResolvedProjectReferenceProject( + project, + reloadChildProject, + ProjectReferenceProjectLoadKind.Find + ); + } } } } @@ -2904,16 +2961,20 @@ namespace ts.server { this.createAndLoadConfiguredProject(configFileName, `Creating project for original file: ${originalFileInfo.fileName}${location !== originalLocation ? " for location: " + location.fileName : ""}`); updateProjectIfDirty(configuredProject); - if (configuredProject.isSolution()) { + const projectContainsOriginalInfo = (project: ConfiguredProject) => { + const info = this.getScriptInfo(fileName); + return info && projectContainsInfoDirectly(project, info); + }; + + if (configuredProject.isSolution() || !projectContainsOriginalInfo(configuredProject)) { // Find the project that is referenced from this solution that contains the script info directly configuredProject = forEachResolvedProjectReferenceProject( configuredProject, child => { updateProjectIfDirty(child); - const info = this.getScriptInfo(fileName); - return info && projectContainsInfoDirectly(child, info) ? child : undefined; + return projectContainsOriginalInfo(child) ? child : undefined; }, - ProjectReferenceProjectLoadKind.FindCreateLoad, + configuredProject.getCompilerOptions().disableReferencedProjectLoad ? ProjectReferenceProjectLoadKind.Find : ProjectReferenceProjectLoadKind.FindCreateLoad, `Creating project referenced in solution ${configuredProject.projectName} to find possible configured project for original file: ${originalFileInfo.fileName}${location !== originalLocation ? " for location: " + location.fileName : ""}` ); if (!configuredProject) return undefined; @@ -2965,38 +3026,31 @@ namespace ts.server { let configFileName: NormalizedPath | undefined; let configFileErrors: readonly Diagnostic[] | undefined; let project: ConfiguredProject | ExternalProject | undefined = this.findExternalProjectContainingOpenScriptInfo(info); - let defaultConfigProject: ConfiguredProject | undefined; let retainProjects: ConfiguredProject[] | ConfiguredProject | undefined; - if (!project && !this.syntaxOnly) { // Checking syntaxOnly is an optimization + let projectForConfigFileDiag: ConfiguredProject | undefined; + let defaultConfigProjectIsCreated = false; + if (!project && this.serverMode === LanguageServiceMode.Semantic) { // Checking semantic mode is an optimization configFileName = this.getConfigFileNameForFile(info); if (configFileName) { project = this.findConfiguredProjectByProjectName(configFileName); if (!project) { project = this.createLoadAndUpdateConfiguredProject(configFileName, `Creating possible configured project for ${info.fileName} to open`); - // Send the event only if the project got created as part of this open request and info is part of the project - if (!project.containsScriptInfo(info)) { - // Since the file isnt part of configured project, do not send config file info - configFileName = undefined; - } - else { - configFileErrors = project.getAllProjectErrors(); - this.sendConfigFileDiagEvent(project, info.fileName); - } + defaultConfigProjectIsCreated = true; } else { // Ensure project is ready to check if it contains opened script info updateProjectIfDirty(project); } - defaultConfigProject = project; - retainProjects = defaultConfigProject; + projectForConfigFileDiag = project.containsScriptInfo(info) ? project : undefined; + retainProjects = project; // If this configured project doesnt contain script info but // it is solution with project references, try those project references - if (!project.containsScriptInfo(info) && project.isSolution()) { + if (!projectContainsInfoDirectly(project, info)) { forEachResolvedProjectReferenceProject( project, - (child, childConfigFileName) => { + child => { updateProjectIfDirty(child); // Retain these projects if (!isArray(retainProjects)) { @@ -3008,20 +3062,35 @@ namespace ts.server { // If script info belongs to this child project, use this as default config project if (projectContainsInfoDirectly(child, info)) { - configFileName = childConfigFileName; - configFileErrors = child.getAllProjectErrors(); - this.sendConfigFileDiagEvent(child, info.fileName); + projectForConfigFileDiag = child; return child; } + + // If this project uses the script info (even through project reference), if default project is not found, use this for configFileDiag + if (!projectForConfigFileDiag && child.containsScriptInfo(info)) { + projectForConfigFileDiag = child; + } }, ProjectReferenceProjectLoadKind.FindCreateLoad, `Creating project referenced in solution ${project.projectName} to find possible configured project for ${info.fileName} to open` ); } - else { - // Create ancestor configured project - this.createAncestorProjects(info, defaultConfigProject || project); + + // Send the event only if the project got created as part of this open request and info is part of the project + if (projectForConfigFileDiag) { + configFileName = projectForConfigFileDiag.getConfigFilePath(); + if (projectForConfigFileDiag !== project || defaultConfigProjectIsCreated) { + configFileErrors = projectForConfigFileDiag.getAllProjectErrors(); + this.sendConfigFileDiagEvent(projectForConfigFileDiag, info.fileName); + } } + else { + // Since the file isnt part of configured project, do not send config file info + configFileName = undefined; + } + + // Create ancestor configured project + this.createAncestorProjects(info, project); } } @@ -3099,10 +3168,10 @@ namespace ts.server { if (forEachPotentialProjectReference( project, potentialRefPath => forProjects!.has(potentialRefPath) - ) || (project.isSolution() && forEachResolvedProjectReference( + ) || forEachResolvedProjectReference( project, (_ref, resolvedPath) => forProjects!.has(resolvedPath) - ))) { + )) { // Load children this.ensureProjectChildren(project, seenProjects); } @@ -3259,7 +3328,7 @@ namespace ts.server { } private telemetryOnOpenFile(scriptInfo: ScriptInfo): void { - if (this.syntaxOnly || !this.eventHandler || !scriptInfo.isJavaScript() || !addToSeen(this.allJsFilesForOpenFileTelemetry, scriptInfo.path)) { + if (this.serverMode !== LanguageServiceMode.Semantic || !this.eventHandler || !scriptInfo.isJavaScript() || !addToSeen(this.allJsFilesForOpenFileTelemetry, scriptInfo.path)) { return; } @@ -3571,7 +3640,7 @@ namespace ts.server { for (const file of proj.rootFiles) { const normalized = toNormalizedPath(file.fileName); if (getBaseConfigFileName(normalized)) { - if (!this.syntaxOnly && this.host.fileExists(normalized)) { + if (this.serverMode === LanguageServiceMode.Semantic && this.host.fileExists(normalized)) { (tsConfigFiles || (tsConfigFiles = [])).push(normalized); } } @@ -3693,12 +3762,10 @@ namespace ts.server { /*@internal*/ getPackageJsonsVisibleToFile(fileName: string, rootDir?: string): readonly PackageJsonInfo[] { const packageJsonCache = this.packageJsonCache; - const watchPackageJsonFile = this.watchPackageJsonFile.bind(this); - const toPath = this.toPath.bind(this); - const rootPath = rootDir && toPath(rootDir); - const filePath = toPath(fileName); + const rootPath = rootDir && this.toPath(rootDir); + const filePath = this.toPath(fileName); const result: PackageJsonInfo[] = []; - forEachAncestorDirectory(getDirectoryPath(filePath), function processDirectory(directory): boolean | undefined { + const processDirectory = (directory: Path): boolean | undefined => { switch (packageJsonCache.directoryHasPackageJson(directory)) { // Sync and check same directory again case Ternary.Maybe: @@ -3707,15 +3774,16 @@ namespace ts.server { // Check package.json case Ternary.True: const packageJsonFileName = combinePaths(directory, "package.json"); - watchPackageJsonFile(packageJsonFileName); + this.watchPackageJsonFile(packageJsonFileName as Path); const info = packageJsonCache.getInDirectory(directory); if (info) result.push(info); } - if (rootPath && rootPath === toPath(directory)) { + if (rootPath && rootPath === this.toPath(directory)) { return true; } - }); + }; + forEachAncestorDirectory(getDirectoryPath(filePath), processDirectory); return result; } @@ -3759,9 +3827,9 @@ namespace ts.server { /*@internal*/ includePackageJsonAutoImports(): PackageJsonAutoImportPreference { switch (this.hostConfiguration.preferences.includePackageJsonAutoImports) { - case "none": return PackageJsonAutoImportPreference.None; - case "all": return PackageJsonAutoImportPreference.All; - default: return PackageJsonAutoImportPreference.ExcludeDevDependencies; + case "on": return PackageJsonAutoImportPreference.On; + case "off": return PackageJsonAutoImportPreference.Off; + default: return PackageJsonAutoImportPreference.Auto; } } diff --git a/src/server/packageJsonCache.ts b/src/server/packageJsonCache.ts index 8c09ebda2c4..3aa6129430a 100644 --- a/src/server/packageJsonCache.ts +++ b/src/server/packageJsonCache.ts @@ -42,11 +42,9 @@ namespace ts.server { }; function addOrUpdate(fileName: Path) { - const packageJsonInfo = createPackageJsonInfo(fileName, host.host); - if (packageJsonInfo !== undefined) { - packageJsons.set(fileName, packageJsonInfo); - directoriesWithoutPackageJson.delete(getDirectoryPath(fileName)); - } + const packageJsonInfo = Debug.checkDefined(createPackageJsonInfo(fileName, host.host)); + packageJsons.set(fileName, packageJsonInfo); + directoriesWithoutPackageJson.delete(getDirectoryPath(fileName)); } function directoryHasPackageJson(directory: Path) { diff --git a/src/server/project.ts b/src/server/project.ts index 7742a416d9d..e3720383543 100644 --- a/src/server/project.ts +++ b/src/server/project.ts @@ -246,7 +246,7 @@ namespace ts.server { /*@internal*/ private dirtyFilesForSuggestions: Set | undefined; /*@internal*/ - private symlinks: ReadonlyESMap | undefined; + private symlinks: SymlinkCache | undefined; /*@internal*/ autoImportProviderHost: AutoImportProviderProject | false | undefined; @@ -274,15 +274,27 @@ namespace ts.server { this.compilerOptions.allowNonTsExtensions = true; this.compilerOptions.allowJs = true; } - else if (hasExplicitListOfFiles || this.compilerOptions.allowJs || this.projectService.hasDeferredExtension()) { + else if (hasExplicitListOfFiles || getAllowJSCompilerOption(this.compilerOptions) || this.projectService.hasDeferredExtension()) { // If files are listed explicitly or allowJs is specified, allow all extensions this.compilerOptions.allowNonTsExtensions = true; } - this.languageServiceEnabled = true; - if (projectService.syntaxOnly) { - this.compilerOptions.noResolve = true; - this.compilerOptions.types = []; + switch (projectService.serverMode) { + case LanguageServiceMode.Semantic: + this.languageServiceEnabled = true; + break; + case LanguageServiceMode.PartialSemantic: + this.languageServiceEnabled = true; + this.compilerOptions.noResolve = true; + this.compilerOptions.types = []; + break; + case LanguageServiceMode.Syntactic: + this.languageServiceEnabled = false; + this.compilerOptions.noResolve = true; + this.compilerOptions.types = []; + break; + default: + Debug.assertNever(projectService.serverMode); } this.setInternalCompilerOptionsForEmittingJsFiles(); @@ -296,8 +308,12 @@ namespace ts.server { this.realpath = maybeBind(host, host.realpath); // Use the current directory as resolution root only if the project created using current directory string - this.resolutionCache = createResolutionCache(this, currentDirectory && this.currentDirectory, /*logChangesWhenResolvingModule*/ true); - this.languageService = createLanguageService(this, this.documentRegistry, this.projectService.syntaxOnly); + this.resolutionCache = createResolutionCache( + this, + currentDirectory && this.currentDirectory, + /*logChangesWhenResolvingModule*/ true + ); + this.languageService = createLanguageService(this, this.documentRegistry, this.projectService.serverMode); if (lastFileExceededProgramSize) { this.disableLanguageService(lastFileExceededProgramSize); } @@ -324,9 +340,9 @@ namespace ts.server { } /*@internal*/ - getProbableSymlinks(files: readonly SourceFile[]): ReadonlyESMap { + getSymlinkCache(): SymlinkCache { return this.symlinks || (this.symlinks = discoverProbableSymlinks( - files, + this.program?.getSourceFiles() || emptyArray, this.getCanonicalFileName, this.getCurrentDirectory())); } @@ -647,7 +663,7 @@ namespace ts.server { } enableLanguageService() { - if (this.languageServiceEnabled) { + if (this.languageServiceEnabled || this.projectService.serverMode === LanguageServiceMode.Syntactic) { return; } this.languageServiceEnabled = true; @@ -659,6 +675,7 @@ namespace ts.server { if (!this.languageServiceEnabled) { return; } + Debug.assert(this.projectService.serverMode !== LanguageServiceMode.Syntactic); this.languageService.cleanupSemanticCache(); this.languageServiceEnabled = false; this.lastFileExceededProgramSize = lastFileExceededProgramSize; @@ -988,7 +1005,7 @@ namespace ts.server { // update builder only if language service is enabled // otherwise tell it to drop its internal state - if (this.languageServiceEnabled && !this.projectService.syntaxOnly) { + if (this.languageServiceEnabled && this.projectService.serverMode === LanguageServiceMode.Semantic) { // 1. no changes in structure, no changes in unresolved imports - do nothing // 2. no changes in structure, unresolved imports were changed - collect unresolved imports for all files // (can reuse cached imports for files that were not changed) @@ -1119,7 +1136,7 @@ namespace ts.server { } // Watch the type locations that would be added to program as part of automatic type resolutions - if (this.languageServiceEnabled && !this.projectService.syntaxOnly) { + if (this.languageServiceEnabled && this.projectService.serverMode === LanguageServiceMode.Semantic) { this.resolutionCache.updateTypeRootsWatch(); } } @@ -1622,15 +1639,31 @@ namespace ts.server { /*@internal*/ includePackageJsonAutoImports(): PackageJsonAutoImportPreference { - if (this.projectService.includePackageJsonAutoImports() === PackageJsonAutoImportPreference.None || + if (this.projectService.includePackageJsonAutoImports() === PackageJsonAutoImportPreference.Off || !this.languageServiceEnabled || isInsideNodeModules(this.currentDirectory) || !this.isDefaultProjectForOpenFiles()) { - return PackageJsonAutoImportPreference.None; + return PackageJsonAutoImportPreference.Off; } return this.projectService.includePackageJsonAutoImports(); } + /*@internal*/ + getModuleResolutionHostForAutoImportProvider(): ModuleResolutionHost { + if (this.program) { + return { + fileExists: this.program.fileExists, + directoryExists: this.program.directoryExists, + realpath: this.program.realpath || this.projectService.host.realpath?.bind(this.projectService.host), + getCurrentDirectory: this.getCurrentDirectory.bind(this), + readFile: this.projectService.host.readFile.bind(this.projectService.host), + getDirectories: this.projectService.host.getDirectories.bind(this.projectService.host), + trace: this.projectService.host.trace?.bind(this.projectService.host), + }; + } + return this.projectService.host; + } + /*@internal*/ getPackageJsonAutoImportProvider(): Program | undefined { if (this.autoImportProviderHost === false) { @@ -1638,7 +1671,7 @@ namespace ts.server { } if (this.autoImportProviderHost) { updateProjectIfDirty(this.autoImportProviderHost); - if (!this.autoImportProviderHost.hasRoots()) { + if (this.autoImportProviderHost.isEmpty()) { this.autoImportProviderHost.close(); this.autoImportProviderHost = undefined; return undefined; @@ -1648,7 +1681,7 @@ namespace ts.server { const dependencySelection = this.includePackageJsonAutoImports(); if (dependencySelection) { - this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.projectService.host, this.documentRegistry); + this.autoImportProviderHost = AutoImportProviderProject.create(dependencySelection, this, this.getModuleResolutionHostForAutoImportProvider(), this.documentRegistry); if (this.autoImportProviderHost) { updateProjectIfDirty(this.autoImportProviderHost); return this.autoImportProviderHost.getCurrentProgram(); @@ -1806,6 +1839,9 @@ namespace ts.server { export class AutoImportProviderProject extends Project { private static readonly newName = createProjectNameFactoryWithCounter(makeAutoImportProviderProjectName); + /*@internal*/ + private static readonly maxDependencies = 10; + /*@internal*/ static getRootFileNames(dependencySelection: PackageJsonAutoImportPreference, hostProject: Project, moduleResolutionHost: ModuleResolutionHost, compilerOptions: CompilerOptions): string[] { if (!dependencySelection) { @@ -1819,9 +1855,6 @@ namespace ts.server { for (const packageJson of packageJsons) { packageJson.dependencies?.forEach((_, dependenyName) => addDependency(dependenyName)); packageJson.peerDependencies?.forEach((_, dependencyName) => addDependency(dependencyName)); - if (dependencySelection === PackageJsonAutoImportPreference.All) { - packageJson.devDependencies?.forEach((_, dependencyName) => addDependency(dependencyName)); - } } if (dependencyNames) { @@ -1832,8 +1865,15 @@ namespace ts.server { moduleResolutionHost)); for (const resolution of resolutions) { - if (resolution.resolvedTypeReferenceDirective?.resolvedFileName && !hostProject.getCurrentProgram()!.getSourceFile(resolution.resolvedTypeReferenceDirective.resolvedFileName)) { - rootNames = append(rootNames, resolution.resolvedTypeReferenceDirective.resolvedFileName); + if (!resolution.resolvedTypeReferenceDirective?.resolvedFileName) continue; + const { resolvedFileName } = resolution.resolvedTypeReferenceDirective; + const fileName = moduleResolutionHost.realpath?.(resolvedFileName) || resolvedFileName; + if (!hostProject.getCurrentProgram()!.getSourceFile(fileName) && !hostProject.getCurrentProgram()!.getSourceFile(resolvedFileName)) { + rootNames = append(rootNames, fileName); + // Avoid creating a large project that would significantly slow down time to editor interactivity + if (dependencySelection === PackageJsonAutoImportPreference.Auto && rootNames.length > this.maxDependencies) { + return ts.emptyArray; + } } } } @@ -1849,7 +1889,7 @@ namespace ts.server { /*@internal*/ static create(dependencySelection: PackageJsonAutoImportPreference, hostProject: Project, moduleResolutionHost: ModuleResolutionHost, documentRegistry: DocumentRegistry): AutoImportProviderProject | undefined { - if (dependencySelection === PackageJsonAutoImportPreference.None) { + if (dependencySelection === PackageJsonAutoImportPreference.Off) { return undefined; } @@ -1860,7 +1900,7 @@ namespace ts.server { skipLibCheck: true, types: ts.emptyArray, lib: ts.emptyArray, - sourceMap: false + sourceMap: false, }; const rootNames = this.getRootFileNames(dependencySelection, hostProject, moduleResolutionHost, compilerOptions); @@ -1895,6 +1935,11 @@ namespace ts.server { this.rootFileNames = initialRootNames; } + /*@internal*/ + isEmpty() { + return !some(this.rootFileNames); + } + isOrphan() { return true; } @@ -1905,7 +1950,7 @@ namespace ts.server { rootFileNames = AutoImportProviderProject.getRootFileNames( this.hostProject.includePackageJsonAutoImports(), this.hostProject, - this.projectService.host, + this.hostProject.getModuleResolutionHostForAutoImportProvider(), this.getCompilationSettings()); } @@ -1932,14 +1977,31 @@ namespace ts.server { throw new Error("AutoImportProviderProject is an auto import provider; use `markAsDirty()` instead."); } + getModuleResolutionHostForAutoImportProvider(): never { + throw new Error("AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead."); + } + + getProjectReferences() { + return this.hostProject.getProjectReferences(); + } + + useSourceOfProjectReferenceRedirect() { + return true; + } + /*@internal*/ includePackageJsonAutoImports() { - return PackageJsonAutoImportPreference.None; + return PackageJsonAutoImportPreference.Off; } getTypeAcquisition(): TypeAcquisition { return { enable: false }; } + + /*@internal*/ + getSymlinkCache() { + return this.hostProject.getSymlinkCache(); + } } /** @@ -2057,6 +2119,7 @@ namespace ts.server { * @returns: true if set of files in the project stays the same and false - otherwise. */ updateGraph(): boolean { + const isInitialLoad = this.isInitialLoadPending(); this.isInitialLoadPending = returnFalse; const reloadLevel = this.pendingReload; this.pendingReload = ConfigFileProgramReloadLevel.None; @@ -2070,7 +2133,7 @@ namespace ts.server { this.openFileWatchTriggered.clear(); const reason = Debug.checkDefined(this.pendingReloadReason); this.pendingReloadReason = undefined; - this.projectService.reloadConfiguredProject(this, reason); + this.projectService.reloadConfiguredProject(this, reason, isInitialLoad); result = true; break; default: @@ -2216,9 +2279,8 @@ namespace ts.server { } /* @internal */ - /** Find the configured project from the project references in this solution which contains the info directly */ - getDefaultChildProjectFromSolution(info: ScriptInfo) { - Debug.assert(this.isSolution()); + /** Find the configured project from the project references in project which contains the info directly */ + getDefaultChildProjectFromProjectWithReferences(info: ScriptInfo) { return forEachResolvedProjectReferenceProject( this, child => projectContainsInfoDirectly(child, info) ? @@ -2248,16 +2310,20 @@ namespace ts.server { return !!configFileExistenceInfo.openFilesImpactedByConfigFile.size; } - const isSolution = this.isSolution(); - // If there is no pending update for this project, // We know exact set of open files that get impacted by this configured project as the files in the project // The project is referenced only if open files impacted by this project are present in this project return forEachEntry( configFileExistenceInfo.openFilesImpactedByConfigFile, - (_value, infoPath) => isSolution ? - !!this.getDefaultChildProjectFromSolution(this.projectService.getScriptInfoForPath(infoPath)!) : - this.containsScriptInfo(this.projectService.getScriptInfoForPath(infoPath)!) + (_value, infoPath) => { + const info = this.projectService.getScriptInfoForPath(infoPath)!; + return this.containsScriptInfo(info) || + !!forEachResolvedProjectReferenceProject( + this, + child => child.containsScriptInfo(info), + ProjectReferenceProjectLoadKind.Find + ); + } ) || false; } diff --git a/src/server/protocol.ts b/src/server/protocol.ts index cdeaad1a4fc..6a52afc8175 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -617,6 +617,12 @@ namespace ts.server.protocol { * so this description should make sense by itself if the parent is inlineable=true */ description: string; + + /** + * A message to show to the user if the refactoring cannot be applied in + * the current context. + */ + notApplicableReason?: string; } export interface GetEditsForRefactorRequest extends Request { @@ -2256,6 +2262,12 @@ namespace ts.server.protocol { readonly isGlobalCompletion: boolean; readonly isMemberCompletion: boolean; readonly isNewIdentifierLocation: boolean; + /** + * In the absence of `CompletionEntry["replacementSpan"]`, the editor may choose whether to use + * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span + * must be used to commit that completion entry. + */ + readonly optionalReplacementSpan?: TextSpan; readonly entries: readonly CompletionEntry[]; } @@ -3217,8 +3229,9 @@ namespace ts.server.protocol { readonly allowTextChangesInNewFiles?: boolean; readonly lazyConfiguredProjectsFromExternalProject?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; + readonly provideRefactorNotApplicableReason?: boolean; readonly allowRenameOfImportPath?: boolean; - readonly includePackageJsonAutoImports?: "exclude-dev" | "all" | "none"; + readonly includePackageJsonAutoImports?: "auto" | "on" | "off"; } export interface CompilerOptions { diff --git a/src/server/session.ts b/src/server/session.ts index c559fb8faa9..73a86adf7c1 100644 --- a/src/server/session.ts +++ b/src/server/session.ts @@ -284,34 +284,43 @@ namespace ts.server { return deduplicate(outputs, equateValues); } - function combineProjectOutputFromEveryProject(projectService: ProjectService, action: (project: Project) => readonly T[], areEqual: (a: T, b: T) => boolean) { - const outputs: T[] = []; + type CombineOutputResult = { project: Project; result: readonly T[]; }[]; + function combineOutputResultContains(outputs: CombineOutputResult, output: T, areEqual: (a: T, b: T) => boolean) { + return outputs.some(({ result }) => contains(result, output, areEqual)); + } + function addToCombineOutputResult(outputs: CombineOutputResult, project: Project, result: readonly T[]) { + if (result.length) outputs.push({ project, result }); + } + + function combineProjectOutputFromEveryProject(projectService: ProjectService, action: (project: Project) => readonly T[], areEqual: (a: T, b: T) => boolean): CombineOutputResult { + const outputs: CombineOutputResult = []; projectService.loadAncestorProjectTree(); projectService.forEachEnabledProject(project => { const theseOutputs = action(project); - outputs.push(...theseOutputs.filter(output => !outputs.some(o => areEqual(o, output)))); + addToCombineOutputResult(outputs, project, filter(theseOutputs, output => !combineOutputResultContains(outputs, output, areEqual))); }); return outputs; } + function flattenCombineOutputResult(outputs: CombineOutputResult): readonly T[] { + return flatMap(outputs, ({ result }) => result); + } + function combineProjectOutputWhileOpeningReferencedProjects( projects: Projects, defaultProject: Project, action: (project: Project) => readonly T[], getLocation: (t: T) => DocumentPosition, resultsEqual: (a: T, b: T) => boolean, - ): T[] { - const outputs: T[] = []; + ): CombineOutputResult { + const outputs: CombineOutputResult = []; combineProjectOutputWorker( projects, defaultProject, /*initialLocation*/ undefined, (project, _, tryAddToTodo) => { - for (const output of action(project)) { - if (!contains(outputs, output, resultsEqual) && !tryAddToTodo(project, getLocation(output))) { - outputs.push(output); - } - } + const theseOutputs = action(project); + addToCombineOutputResult(outputs, project, filter(theseOutputs, output => !combineOutputResultContains(outputs, output, resultsEqual) && !tryAddToTodo(project, getLocation(output)))); }, ); return outputs; @@ -326,7 +335,6 @@ namespace ts.server { hostPreferences: UserPreferences ): readonly RenameLocation[] { const outputs: RenameLocation[] = []; - combineProjectOutputWorker( projects, defaultProject, @@ -577,7 +585,7 @@ namespace ts.server { undefined; } - const invalidSyntaxOnlyCommands: readonly CommandNames[] = [ + const invalidPartialSemanticModeCommands: readonly CommandNames[] = [ CommandNames.OpenExternalProject, CommandNames.OpenExternalProjects, CommandNames.CloseExternalProject, @@ -613,6 +621,36 @@ namespace ts.server { CommandNames.ProvideCallHierarchyOutgoingCalls, ]; + const invalidSyntacticModeCommands: readonly CommandNames[] = [ + ...invalidPartialSemanticModeCommands, + CommandNames.Definition, + CommandNames.DefinitionFull, + CommandNames.DefinitionAndBoundSpan, + CommandNames.DefinitionAndBoundSpanFull, + CommandNames.TypeDefinition, + CommandNames.Implementation, + CommandNames.ImplementationFull, + CommandNames.References, + CommandNames.ReferencesFull, + CommandNames.Rename, + CommandNames.RenameLocationsFull, + CommandNames.RenameInfoFull, + CommandNames.Quickinfo, + CommandNames.QuickinfoFull, + CommandNames.CompletionInfo, + CommandNames.Completions, + CommandNames.CompletionsFull, + CommandNames.CompletionDetails, + CommandNames.CompletionDetailsFull, + CommandNames.SignatureHelp, + CommandNames.SignatureHelpFull, + CommandNames.Navto, + CommandNames.NavtoFull, + CommandNames.Occurrences, + CommandNames.DocumentHighlights, + CommandNames.DocumentHighlightsFull, + ]; + export interface SessionOptions { host: ServerHost; cancellationToken: ServerCancellationToken; @@ -629,7 +667,9 @@ namespace ts.server { eventHandler?: ProjectServiceEventHandler; /** Has no effect if eventHandler is also specified. */ suppressDiagnosticEvents?: boolean; + /** @deprecated use serverMode instead */ syntaxOnly?: boolean; + serverMode?: LanguageServiceMode; throttleWaitMilliseconds?: number; noGetErrOnBackgroundUpdate?: boolean; @@ -701,18 +741,32 @@ namespace ts.server { allowLocalPluginLoads: opts.allowLocalPluginLoads, typesMapLocation: opts.typesMapLocation, syntaxOnly: opts.syntaxOnly, + serverMode: opts.serverMode, }; this.projectService = new ProjectService(settings); this.projectService.setPerformanceEventHandler(this.performanceEventHandler.bind(this)); this.gcTimer = new GcTimer(this.host, /*delay*/ 7000, this.logger); - // Make sure to setup handlers to throw error for not allowed commands on syntax server; - if (this.projectService.syntaxOnly) { - invalidSyntaxOnlyCommands.forEach(commandName => - this.handlers.set(commandName, request => { - throw new Error(`Request: ${request.command} not allowed on syntaxServer`); - }) - ); + // Make sure to setup handlers to throw error for not allowed commands on syntax server + switch (this.projectService.serverMode) { + case LanguageServiceMode.Semantic: + break; + case LanguageServiceMode.PartialSemantic: + invalidPartialSemanticModeCommands.forEach(commandName => + this.handlers.set(commandName, request => { + throw new Error(`Request: ${request.command} not allowed in LanguageServiceMode.PartialSemantic`); + }) + ); + break; + case LanguageServiceMode.Syntactic: + invalidSyntacticModeCommands.forEach(commandName => + this.handlers.set(commandName, request => { + throw new Error(`Request: ${request.command} not allowed in LanguageServiceMode.Syntactic`); + }) + ); + break; + default: + Debug.assertNever(this.projectService.serverMode); } } @@ -1729,6 +1783,7 @@ namespace ts.server { const res: protocol.CompletionInfo = { ...completions, + optionalReplacementSpan: completions.optionalReplacementSpan && toProtocolTextSpan(completions.optionalReplacementSpan, scriptInfo), entries, }; return res; @@ -1930,38 +1985,42 @@ namespace ts.server { private getNavigateToItems(args: protocol.NavtoRequestArgs, simplifiedResult: boolean): readonly protocol.NavtoItem[] | readonly NavigateToItem[] { const full = this.getFullNavigateToItems(args); - return !simplifiedResult ? full : full.map((navItem) => { - const { file, project } = this.getFileAndProject({ file: navItem.fileName }); - const scriptInfo = project.getScriptInfo(file)!; - const bakedItem: protocol.NavtoItem = { - name: navItem.name, - kind: navItem.kind, - kindModifiers: navItem.kindModifiers, - isCaseSensitive: navItem.isCaseSensitive, - matchKind: navItem.matchKind, - file: navItem.fileName, - start: scriptInfo.positionToLineOffset(navItem.textSpan.start), - end: scriptInfo.positionToLineOffset(textSpanEnd(navItem.textSpan)) - }; - if (navItem.kindModifiers && (navItem.kindModifiers !== "")) { - bakedItem.kindModifiers = navItem.kindModifiers; - } - if (navItem.containerName && (navItem.containerName.length > 0)) { - bakedItem.containerName = navItem.containerName; - } - if (navItem.containerKind && (navItem.containerKind.length > 0)) { - bakedItem.containerKind = navItem.containerKind; - } - return bakedItem; - }); + return !simplifiedResult ? + flattenCombineOutputResult(full) : + flatMap( + full, + ({ project, result }) => result.map(navItem => { + const scriptInfo = project.getScriptInfo(navItem.fileName)!; + const bakedItem: protocol.NavtoItem = { + name: navItem.name, + kind: navItem.kind, + kindModifiers: navItem.kindModifiers, + isCaseSensitive: navItem.isCaseSensitive, + matchKind: navItem.matchKind, + file: navItem.fileName, + start: scriptInfo.positionToLineOffset(navItem.textSpan.start), + end: scriptInfo.positionToLineOffset(textSpanEnd(navItem.textSpan)) + }; + if (navItem.kindModifiers && (navItem.kindModifiers !== "")) { + bakedItem.kindModifiers = navItem.kindModifiers; + } + if (navItem.containerName && (navItem.containerName.length > 0)) { + bakedItem.containerName = navItem.containerName; + } + if (navItem.containerKind && (navItem.containerKind.length > 0)) { + bakedItem.containerKind = navItem.containerKind; + } + return bakedItem; + }) + ); } - private getFullNavigateToItems(args: protocol.NavtoRequestArgs): readonly NavigateToItem[] { + private getFullNavigateToItems(args: protocol.NavtoRequestArgs): CombineOutputResult { const { currentFileOnly, searchValue, maxResultCount, projectFileName } = args; if (currentFileOnly) { Debug.assertDefined(args.file); const { file, project } = this.getFileAndProject(args as protocol.FileRequestArgs); - return project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, file); + return [{ project, result: project.getLanguageService().getNavigateToItems(searchValue, maxResultCount, file) }]; } else if (!args.file && !projectFileName) { return combineProjectOutputFromEveryProject( @@ -2082,10 +2141,13 @@ namespace ts.server { const newPath = toNormalizedPath(args.newFilePath); const formatOptions = this.getHostFormatOptions(); const preferences = this.getHostPreferences(); - const changes = combineProjectOutputFromEveryProject( - this.projectService, - project => project.getLanguageService().getEditsForFileRename(oldPath, newPath, formatOptions, preferences), - (a, b) => a.fileName === b.fileName); + const changes = flattenCombineOutputResult( + combineProjectOutputFromEveryProject( + this.projectService, + project => project.getLanguageService().getEditsForFileRename(oldPath, newPath, formatOptions, preferences), + (a, b) => a.fileName === b.fileName + ) + ); return simplifiedResult ? changes.map(c => this.mapTextChangeToCodeEdit(c)) : changes; } @@ -2347,6 +2409,7 @@ namespace ts.server { kind: item.kind, kindModifiers: item.kindModifiers, file: item.file, + containerName: item.containerName, span: toProtocolTextSpan(item.span, scriptInfo), selectionSpan: toProtocolTextSpan(item.selectionSpan, scriptInfo) }; diff --git a/src/server/typingsCache.ts b/src/server/typingsCache.ts index 1d63a6df6ae..a20346c2b2e 100644 --- a/src/server/typingsCache.ts +++ b/src/server/typingsCache.ts @@ -71,7 +71,7 @@ namespace ts.server { function compilerOptionsChanged(opt1: CompilerOptions, opt2: CompilerOptions): boolean { // TODO: add more relevant properties - return opt1.allowJs !== opt2.allowJs; + return getAllowJSCompilerOption(opt1) !== getAllowJSCompilerOption(opt2); } function unresolvedImportsChanged(imports1: SortedReadonlyArray | undefined, imports2: SortedReadonlyArray | undefined): boolean { diff --git a/src/services/callHierarchy.ts b/src/services/callHierarchy.ts index 9934c91c88e..ca5a193e78f 100644 --- a/src/services/callHierarchy.ts +++ b/src/services/callHierarchy.ts @@ -249,6 +249,10 @@ namespace ts.CallHierarchy { } return undefined; } + // #39453 + if (isVariableDeclaration(location) && location.initializer && isConstNamedExpression(location.initializer)) { + return location.initializer; + } if (!followingSymbol) { let symbol = typeChecker.getSymbolAtLocation(location); if (symbol) { diff --git a/src/services/classifier2020.ts b/src/services/classifier2020.ts new file mode 100644 index 00000000000..263d1ca89d2 --- /dev/null +++ b/src/services/classifier2020.ts @@ -0,0 +1,249 @@ +/** @internal */ +namespace ts.classifier.v2020 { + + export const enum TokenEncodingConsts { + typeOffset = 8, + modifierMask = (1 << typeOffset) - 1 + } + + export const enum TokenType { + class, enum, interface, namespace, typeParameter, type, parameter, variable, enumMember, property, function, member + } + + export const enum TokenModifier { + declaration, static, async, readonly, defaultLibrary, local + } + + /** This is mainly used internally for testing */ + export function getSemanticClassifications(program: Program, cancellationToken: CancellationToken, sourceFile: SourceFile, span: TextSpan): ClassifiedSpan2020[] { + const classifications = getEncodedSemanticClassifications(program, cancellationToken, sourceFile, span); + + Debug.assert(classifications.spans.length % 3 === 0); + const dense = classifications.spans; + const result: ClassifiedSpan2020[] = []; + for (let i = 0; i < dense.length; i += 3) { + result.push({ + textSpan: createTextSpan(dense[i], dense[i + 1]), + classificationType: dense[i + 2] + }); + } + + return result; + } + + export function getEncodedSemanticClassifications(program: Program, cancellationToken: CancellationToken, sourceFile: SourceFile, span: TextSpan): Classifications { + return { + spans: getSemanticTokens(program, sourceFile, span, cancellationToken), + endOfLineState: EndOfLineState.None + }; + } + + function getSemanticTokens(program: Program, sourceFile: SourceFile, span: TextSpan, cancellationToken: CancellationToken): number[] { + const resultTokens: number[] = []; + + const collector = (node: Node, typeIdx: number, modifierSet: number) => { + resultTokens.push(node.getStart(sourceFile), node.getWidth(sourceFile), ((typeIdx + 1) << TokenEncodingConsts.typeOffset) + modifierSet); + }; + + if (program && sourceFile) { + collectTokens(program, sourceFile, span, collector, cancellationToken); + } + return resultTokens; + } + + function collectTokens(program: Program, sourceFile: SourceFile, span: TextSpan, collector: (node: Node, tokenType: number, tokenModifier: number) => void, cancellationToken: CancellationToken) { + const typeChecker = program.getTypeChecker(); + + let inJSXElement = false; + + function visit(node: Node) { + switch(node.kind) { + case SyntaxKind.ModuleDeclaration: + case SyntaxKind.ClassDeclaration: + case SyntaxKind.InterfaceDeclaration: + case SyntaxKind.FunctionDeclaration: + case SyntaxKind.ClassExpression: + case SyntaxKind.FunctionExpression: + case SyntaxKind.ArrowFunction: + cancellationToken.throwIfCancellationRequested(); + } + + if (!node || !textSpanIntersectsWith(span, node.pos, node.getFullWidth()) || node.getFullWidth() === 0) { + return; + } + const prevInJSXElement = inJSXElement; + if (isJsxElement(node) || isJsxSelfClosingElement(node)) { + inJSXElement = true; + } + if (isJsxExpression(node)) { + inJSXElement = false; + } + + if (isIdentifier(node) && !inJSXElement && !inImportClause(node)) { + let symbol = typeChecker.getSymbolAtLocation(node); + if (symbol) { + if (symbol.flags & SymbolFlags.Alias) { + symbol = typeChecker.getAliasedSymbol(symbol); + } + let typeIdx = classifySymbol(symbol, getMeaningFromLocation(node)); + if (typeIdx !== undefined) { + let modifierSet = 0; + if (node.parent) { + const parentIsDeclaration = (isBindingElement(node.parent) || tokenFromDeclarationMapping.get(node.parent.kind) === typeIdx); + if (parentIsDeclaration && (node.parent).name === node) { + modifierSet = 1 << TokenModifier.declaration; + } + } + + // property declaration in constructor + if (typeIdx === TokenType.parameter && isRightSideOfQualifiedNameOrPropertyAccess(node)) { + typeIdx = TokenType.property; + } + + typeIdx = reclassifyByType(typeChecker, node, typeIdx); + + const decl = symbol.valueDeclaration; + if (decl) { + const modifiers = getCombinedModifierFlags(decl); + const nodeFlags = getCombinedNodeFlags(decl); + if (modifiers & ModifierFlags.Static) { + modifierSet |= 1 << TokenModifier.static; + } + if (modifiers & ModifierFlags.Async) { + modifierSet |= 1 << TokenModifier.async; + } + if (typeIdx !== TokenType.class && typeIdx !== TokenType.interface) { + if ((modifiers & ModifierFlags.Readonly) || (nodeFlags & NodeFlags.Const) || (symbol.getFlags() & SymbolFlags.EnumMember)) { + modifierSet |= 1 << TokenModifier.readonly; + } + } + if ((typeIdx === TokenType.variable || typeIdx === TokenType.function) && isLocalDeclaration(decl, sourceFile)) { + modifierSet |= 1 << TokenModifier.local; + } + if (program.isSourceFileDefaultLibrary(decl.getSourceFile())) { + modifierSet |= 1 << TokenModifier.defaultLibrary; + } + } + else if (symbol.declarations && symbol.declarations.some(d => program.isSourceFileDefaultLibrary(d.getSourceFile()))) { + modifierSet |= 1 << TokenModifier.defaultLibrary; + } + + collector(node, typeIdx, modifierSet); + + } + } + } + forEachChild(node, visit); + + inJSXElement = prevInJSXElement; + } + visit(sourceFile); + } + + function classifySymbol(symbol: Symbol, meaning: SemanticMeaning): TokenType | undefined { + const flags = symbol.getFlags(); + if (flags & SymbolFlags.Class) { + return TokenType.class; + } + else if (flags & SymbolFlags.Enum) { + return TokenType.enum; + } + else if (flags & SymbolFlags.TypeAlias) { + return TokenType.type; + } + else if (flags & SymbolFlags.Interface) { + if (meaning & SemanticMeaning.Type) { + return TokenType.interface; + } + } + else if (flags & SymbolFlags.TypeParameter) { + return TokenType.typeParameter; + } + let decl = symbol.valueDeclaration || symbol.declarations && symbol.declarations[0]; + if (decl && isBindingElement(decl)) { + decl = getDeclarationForBindingElement(decl); + } + return decl && tokenFromDeclarationMapping.get(decl.kind); + } + + function reclassifyByType(typeChecker: TypeChecker, node: Node, typeIdx: TokenType): TokenType { + // type based classifications + if (typeIdx === TokenType.variable || typeIdx === TokenType.property || typeIdx === TokenType.parameter) { + const type = typeChecker.getTypeAtLocation(node); + if (type) { + const test = (condition: (type: Type) => boolean) => { + return condition(type) || type.isUnion() && type.types.some(condition); + }; + if (typeIdx !== TokenType.parameter && test(t => t.getConstructSignatures().length > 0)) { + return TokenType.class; + } + if (test(t => t.getCallSignatures().length > 0) && !test(t => t.getProperties().length > 0) || isExpressionInCallExpression(node)) { + return typeIdx === TokenType.property ? TokenType.member : TokenType.function; + } + } + } + return typeIdx; + } + + function isLocalDeclaration(decl: Declaration, sourceFile: SourceFile): boolean { + if (isBindingElement(decl)) { + decl = getDeclarationForBindingElement(decl); + } + if (isVariableDeclaration(decl)) { + return (!isSourceFile(decl.parent.parent.parent) || isCatchClause(decl.parent)) && decl.getSourceFile() === sourceFile; + } + else if (isFunctionDeclaration(decl)) { + return !isSourceFile(decl.parent) && decl.getSourceFile() === sourceFile; + } + return false; + } + + function getDeclarationForBindingElement(element: BindingElement): VariableDeclaration | ParameterDeclaration { + while (true) { + if (isBindingElement(element.parent.parent)) { + element = element.parent.parent; + } + else { + return element.parent.parent; + } + } + } + + function inImportClause(node: Node): boolean { + const parent = node.parent; + return parent && (isImportClause(parent) || isImportSpecifier(parent) || isNamespaceImport(parent)); + } + + function isExpressionInCallExpression(node: Node): boolean { + while (isRightSideOfQualifiedNameOrPropertyAccess(node)) { + node = node.parent; + } + return isCallExpression(node.parent) && node.parent.expression === node; + } + + function isRightSideOfQualifiedNameOrPropertyAccess(node: Node): boolean { + return (isQualifiedName(node.parent) && node.parent.right === node) || (isPropertyAccessExpression(node.parent) && node.parent.name === node); + } + + const tokenFromDeclarationMapping = new Map([ + [SyntaxKind.VariableDeclaration, TokenType.variable], + [SyntaxKind.Parameter, TokenType.parameter], + [SyntaxKind.PropertyDeclaration, TokenType.property], + [SyntaxKind.ModuleDeclaration, TokenType.namespace], + [SyntaxKind.EnumDeclaration, TokenType.enum], + [SyntaxKind.EnumMember, TokenType.enumMember], + [SyntaxKind.ClassDeclaration, TokenType.class], + [SyntaxKind.MethodDeclaration, TokenType.member], + [SyntaxKind.FunctionDeclaration, TokenType.function], + [SyntaxKind.FunctionExpression, TokenType.function], + [SyntaxKind.MethodSignature, TokenType.member], + [SyntaxKind.GetAccessor, TokenType.property], + [SyntaxKind.SetAccessor, TokenType.property], + [SyntaxKind.PropertySignature, TokenType.property], + [SyntaxKind.InterfaceDeclaration, TokenType.interface], + [SyntaxKind.TypeAliasDeclaration, TokenType.type], + [SyntaxKind.TypeParameter, TokenType.typeParameter], + [SyntaxKind.PropertyAssignment, TokenType.property], + [SyntaxKind.ShorthandPropertyAssignment, TokenType.property] + ]); +} diff --git a/src/services/codefixes/convertLiteralTypeToMappedType.ts b/src/services/codefixes/convertLiteralTypeToMappedType.ts new file mode 100644 index 00000000000..4801d8e5f29 --- /dev/null +++ b/src/services/codefixes/convertLiteralTypeToMappedType.ts @@ -0,0 +1,53 @@ +/* @internal */ +namespace ts.codefix { + const fixId = "convertLiteralTypeToMappedType"; + const errorCodes = [Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Did_you_mean_to_use_1_in_0.code]; + + registerCodeFix({ + errorCodes, + getCodeActions: context => { + const { sourceFile, span } = context; + const info = getInfo(sourceFile, span.start); + if (!info) { + return undefined; + } + const { name, constraint } = info; + const changes = textChanges.ChangeTracker.with(context, t => doChange(t, sourceFile, info)); + return [createCodeFixAction(fixId, changes, [Diagnostics.Convert_0_to_1_in_0, constraint, name], fixId, Diagnostics.Convert_all_type_literals_to_mapped_type)]; + }, + fixIds: [fixId], + getAllCodeActions: context => codeFixAll(context, errorCodes, (changes, diag) => { + const info = getInfo(diag.file, diag.start); + if (info) { + doChange(changes, diag.file, info); + } + }) + }); + + interface Info { + container: TypeLiteralNode, + typeNode: TypeNode | undefined; + constraint: string; + name: string; + } + + function getInfo(sourceFile: SourceFile, pos: number): Info | undefined { + const token = getTokenAtPosition(sourceFile, pos); + if (isIdentifier(token)) { + const propertySignature = cast(token.parent.parent, isPropertySignature); + const propertyName = token.getText(sourceFile); + return { + container: cast(propertySignature.parent, isTypeLiteralNode), + typeNode: propertySignature.type, + constraint: propertyName, + name: propertyName === "K" ? "P" : "K", + }; + } + return undefined; + } + + function doChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, { container, typeNode, constraint, name }: Info): void { + changes.replaceNode(sourceFile, container, factory.createMappedTypeNode(/*readonlyToken*/ undefined, + factory.createTypeParameterDeclaration(name, factory.createTypeReferenceNode(constraint)), /*nameType*/ undefined, /*questionToken*/ undefined, typeNode)); + } +} diff --git a/src/services/codefixes/convertToAsyncFunction.ts b/src/services/codefixes/convertToAsyncFunction.ts index a01d3613198..50e00740c68 100644 --- a/src/services/codefixes/convertToAsyncFunction.ts +++ b/src/services/codefixes/convertToAsyncFunction.ts @@ -171,7 +171,7 @@ namespace ts.codefix { // will eventually become // const response = await fetch('...') // so we push an entry for 'response'. - if (lastCallSignature && !isFunctionLikeDeclaration(node.parent) && !synthNamesMap.has(symbolIdString)) { + if (lastCallSignature && !isParameter(node.parent) && !isFunctionLikeDeclaration(node.parent) && !synthNamesMap.has(symbolIdString)) { const firstParameter = firstOrUndefined(lastCallSignature.parameters); const ident = firstParameter && isParameter(firstParameter.valueDeclaration) && tryCast(firstParameter.valueDeclaration.name, isIdentifier) || factory.createUniqueName("result", GeneratedIdentifierFlags.Optimistic); const synthName = getNewNameIfConflict(ident, collidingSymbolMap); @@ -302,7 +302,6 @@ namespace ts.codefix { const [onFulfilled, onRejected] = node.arguments; const onFulfilledArgumentName = getArgBindingName(onFulfilled, transformer); const transformationBody = getTransformationBody(onFulfilled, prevArgName, onFulfilledArgumentName, node, transformer); - if (onRejected) { const onRejectedArgumentName = getArgBindingName(onRejected, transformer); const tryBlock = factory.createBlock(transformExpression(node.expression, transformer, onFulfilledArgumentName).concat(transformationBody)); @@ -310,10 +309,8 @@ namespace ts.codefix { const catchArg = onRejectedArgumentName ? isSynthIdentifier(onRejectedArgumentName) ? onRejectedArgumentName.identifier.text : onRejectedArgumentName.bindingPattern : "e"; const catchVariableDeclaration = factory.createVariableDeclaration(catchArg); const catchClause = factory.createCatchClause(catchVariableDeclaration, factory.createBlock(transformationBody2)); - return [factory.createTryStatement(tryBlock, catchClause, /* finallyBlock */ undefined)]; } - return transformExpression(node.expression, transformer, onFulfilledArgumentName).concat(transformationBody); } @@ -395,11 +392,12 @@ namespace ts.codefix { case SyntaxKind.FunctionExpression: case SyntaxKind.ArrowFunction: { const funcBody = (func as FunctionExpression | ArrowFunction).body; + const returnType = getLastCallSignature(transformer.checker.getTypeAtLocation(func), transformer.checker)?.getReturnType(); + // Arrow functions with block bodies { } will enter this control flow if (isBlock(funcBody)) { let refactoredStmts: Statement[] = []; let seenReturnStatement = false; - for (const statement of funcBody.statements) { if (isReturnStatement(statement)) { seenReturnStatement = true; @@ -407,7 +405,8 @@ namespace ts.codefix { refactoredStmts = refactoredStmts.concat(getInnerTransformationBody(transformer, [statement], prevArgName)); } else { - refactoredStmts.push(...maybeAnnotateAndReturn(statement.expression, parent.typeArguments?.[0])); + const possiblyAwaitedRightHandSide = returnType && statement.expression ? getPossiblyAwaitedRightHandSide(transformer.checker, returnType, statement.expression) : statement.expression; + refactoredStmts.push(...maybeAnnotateAndReturn(possiblyAwaitedRightHandSide, parent.typeArguments?.[0])); } } else { @@ -431,19 +430,21 @@ namespace ts.codefix { return innerCbBody; } - const type = transformer.checker.getTypeAtLocation(func); - const returnType = getLastCallSignature(type, transformer.checker)!.getReturnType(); - const rightHandSide = getSynthesizedDeepClone(funcBody); - const possiblyAwaitedRightHandSide = !!transformer.checker.getPromisedTypeOfPromise(returnType) ? factory.createAwaitExpression(rightHandSide) : rightHandSide; - if (!shouldReturn(parent, transformer)) { - const transformedStatement = createVariableOrAssignmentOrExpressionStatement(prevArgName, possiblyAwaitedRightHandSide, /*typeAnnotation*/ undefined); - if (prevArgName) { - prevArgName.types.push(returnType); + if (returnType) { + const possiblyAwaitedRightHandSide = getPossiblyAwaitedRightHandSide(transformer.checker, returnType, funcBody); + if (!shouldReturn(parent, transformer)) { + const transformedStatement = createVariableOrAssignmentOrExpressionStatement(prevArgName, possiblyAwaitedRightHandSide, /*typeAnnotation*/ undefined); + if (prevArgName) { + prevArgName.types.push(returnType); + } + return transformedStatement; + } + else { + return maybeAnnotateAndReturn(possiblyAwaitedRightHandSide, parent.typeArguments?.[0]); } - return transformedStatement; } else { - return maybeAnnotateAndReturn(possiblyAwaitedRightHandSide, parent.typeArguments?.[0]); + return silentFail(); } } } @@ -454,12 +455,16 @@ namespace ts.codefix { return emptyArray; } + function getPossiblyAwaitedRightHandSide(checker: TypeChecker, type: Type, expr: Expression): AwaitExpression | Expression { + const rightHandSide = getSynthesizedDeepClone(expr); + return !!checker.getPromisedTypeOfPromise(type) ? factory.createAwaitExpression(rightHandSide) : rightHandSide; + } + function getLastCallSignature(type: Type, checker: TypeChecker): Signature | undefined { const callSignatures = checker.getSignaturesOfType(type, SignatureKind.Call); return lastOrUndefined(callSignatures); } - function removeReturns(stmts: readonly Statement[], prevArgName: SynthBindingName | undefined, transformer: Transformer, seenReturnStatement: boolean): readonly Statement[] { const ret: Statement[] = []; for (const stmt of stmts) { diff --git a/src/services/codefixes/convertToMappedObjectType.ts b/src/services/codefixes/convertToMappedObjectType.ts index 600ef5a1fd8..687b7318bbe 100644 --- a/src/services/codefixes/convertToMappedObjectType.ts +++ b/src/services/codefixes/convertToMappedObjectType.ts @@ -44,6 +44,7 @@ namespace ts.codefix { const mappedIntersectionType = factory.createMappedTypeNode( hasEffectiveReadonlyModifier(indexSignature) ? factory.createModifier(SyntaxKind.ReadonlyKeyword) : undefined, mappedTypeParameter, + /*nameType*/ undefined, indexSignature.questionToken, indexSignature.type); const intersectionType = factory.createIntersectionTypeNode([ diff --git a/src/services/codefixes/fixAddVoidToPromise.ts b/src/services/codefixes/fixAddVoidToPromise.ts new file mode 100644 index 00000000000..5e6add96dac --- /dev/null +++ b/src/services/codefixes/fixAddVoidToPromise.ts @@ -0,0 +1,82 @@ +/* @internal */ +namespace ts.codefix { + const fixName = "addVoidToPromise"; + const fixId = "addVoidToPromise"; + const errorCodes = [ + Diagnostics.Expected_0_arguments_but_got_1_Did_you_forget_to_include_void_in_your_type_argument_to_Promise.code + ]; + registerCodeFix({ + errorCodes, + fixIds: [fixId], + getCodeActions(context) { + const changes = textChanges.ChangeTracker.with(context, t => makeChange(t, context.sourceFile, context.span, context.program)); + if (changes.length > 0) { + return [createCodeFixAction(fixName, changes, Diagnostics.Add_void_to_Promise_resolved_without_a_value, fixId, Diagnostics.Add_void_to_all_Promises_resolved_without_a_value)]; + } + }, + getAllCodeActions(context: CodeFixAllContext) { + return codeFixAll(context, errorCodes, (changes, diag) => makeChange(changes, diag.file, diag, context.program, new Set())); + } + }); + + function makeChange(changes: textChanges.ChangeTracker, sourceFile: SourceFile, span: TextSpan, program: Program, seen?: Set) { + const node = getTokenAtPosition(sourceFile, span.start); + if (!isIdentifier(node) || !isCallExpression(node.parent) || node.parent.expression !== node || node.parent.arguments.length !== 0) return; + + const checker = program.getTypeChecker(); + const symbol = checker.getSymbolAtLocation(node); + + // decl should be `new Promise(() => {})` + const decl = symbol?.valueDeclaration; + if (!decl || !isParameter(decl) || !isNewExpression(decl.parent.parent)) return; + + // no need to make this change if we have already seen this parameter. + if (seen?.has(decl)) return; + seen?.add(decl); + + const typeArguments = getEffectiveTypeArguments(decl.parent.parent); + if (some(typeArguments)) { + // append ` | void` to type argument + const typeArgument = typeArguments[0]; + const needsParens = !isUnionTypeNode(typeArgument) && !isParenthesizedTypeNode(typeArgument) && + isParenthesizedTypeNode(factory.createUnionTypeNode([typeArgument, factory.createKeywordTypeNode(SyntaxKind.VoidKeyword)]).types[0]); + if (needsParens) { + changes.insertText(sourceFile, typeArgument.pos, "("); + } + changes.insertText(sourceFile, typeArgument.end, needsParens ? ") | void" : " | void"); + } + else { + // make sure the Promise is type is untyped (i.e., `unknown`) + const signature = checker.getResolvedSignature(node.parent); + const parameter = signature?.parameters[0]; + const parameterType = parameter && checker.getTypeOfSymbolAtLocation(parameter, decl.parent.parent); + if (isInJSFile(decl)) { + if (!parameterType || parameterType.flags & TypeFlags.AnyOrUnknown) { + // give the expression a type + changes.insertText(sourceFile, decl.parent.parent.end, `)`); + changes.insertText(sourceFile, skipTrivia(sourceFile.text, decl.parent.parent.pos), `/** @type {Promise} */(`); + } + } + else { + if (!parameterType || parameterType.flags & TypeFlags.Unknown) { + // add `void` type argument + changes.insertText(sourceFile, decl.parent.parent.expression.end, ""); + } + } + } + } + + function getEffectiveTypeArguments(node: NewExpression) { + if (isInJSFile(node)) { + if (isParenthesizedExpression(node.parent)) { + const jsDocType = getJSDocTypeTag(node.parent)?.typeExpression.type; + if (jsDocType && isTypeReferenceNode(jsDocType) && isIdentifier(jsDocType.typeName) && idText(jsDocType.typeName) === "Promise") { + return jsDocType.typeArguments; + } + } + } + else { + return node.typeArguments; + } + } +} \ No newline at end of file diff --git a/src/services/codefixes/fixSpelling.ts b/src/services/codefixes/fixSpelling.ts index 0c63dc5ebfc..78d748589e8 100644 --- a/src/services/codefixes/fixSpelling.ts +++ b/src/services/codefixes/fixSpelling.ts @@ -6,7 +6,7 @@ namespace ts.codefix { Diagnostics.Cannot_find_name_0_Did_you_mean_1.code, Diagnostics.Cannot_find_name_0_Did_you_mean_the_instance_member_this_0.code, Diagnostics.Cannot_find_name_0_Did_you_mean_the_static_member_1_0.code, - Diagnostics.Module_0_has_no_exported_member_1_Did_you_mean_2.code, + Diagnostics._0_has_no_exported_member_named_1_Did_you_mean_2.code, // for JSX class components Diagnostics.No_overload_matches_this_call.code, // for JSX FC @@ -53,6 +53,12 @@ namespace ts.codefix { } suggestedSymbol = checker.getSuggestedSymbolForNonexistentProperty(node, containingType); } + else if (isQualifiedName(parent) && parent.right === node) { + const symbol = checker.getSymbolAtLocation(parent.left); + if (symbol && symbol.flags & SymbolFlags.Module) { + suggestedSymbol = checker.getSuggestedSymbolForNonexistentModule(parent.right, symbol); + } + } else if (isImportSpecifier(parent) && parent.name === node) { Debug.assertNode(node, isIdentifier, "Expected an identifier for spelling (import)"); const importDeclaration = findAncestor(node, isImportDeclaration)!; diff --git a/src/services/codefixes/fixUnusedIdentifier.ts b/src/services/codefixes/fixUnusedIdentifier.ts index 9467b6a9b0a..72ab6a957b5 100644 --- a/src/services/codefixes/fixUnusedIdentifier.ts +++ b/src/services/codefixes/fixUnusedIdentifier.ts @@ -224,12 +224,10 @@ namespace ts.codefix { } function tryDeleteParameter(changes: textChanges.ChangeTracker, sourceFile: SourceFile, p: ParameterDeclaration, checker: TypeChecker, sourceFiles: readonly SourceFile[], isFixAll = false): void { - if (mayDeleteParameter(p, checker, isFixAll)) { - if (p.modifiers && p.modifiers.length > 0 - && (!isIdentifier(p.name) || FindAllReferences.Core.isSymbolReferencedInFile(p.name, checker, sourceFile))) { - p.modifiers.forEach(modifier => { - changes.deleteModifier(sourceFile, modifier); - }); + if (mayDeleteParameter(checker, sourceFile, p, isFixAll)) { + if (p.modifiers && p.modifiers.length > 0 && + (!isIdentifier(p.name) || FindAllReferences.Core.isSymbolReferencedInFile(p.name, checker, sourceFile))) { + p.modifiers.forEach(modifier => changes.deleteModifier(sourceFile, modifier)); } else { changes.delete(sourceFile, p); @@ -238,29 +236,26 @@ namespace ts.codefix { } } - function mayDeleteParameter(p: ParameterDeclaration, checker: TypeChecker, isFixAll: boolean): boolean { - const { parent } = p; + function mayDeleteParameter(checker: TypeChecker, sourceFile: SourceFile, parameter: ParameterDeclaration, isFixAll: boolean): boolean { + const { parent } = parameter; switch (parent.kind) { case SyntaxKind.MethodDeclaration: // Don't remove a parameter if this overrides something. const symbol = checker.getSymbolAtLocation(parent.name)!; if (isMemberSymbolInBaseType(symbol, checker)) return false; // falls through - case SyntaxKind.Constructor: - case SyntaxKind.FunctionDeclaration: return true; - - case SyntaxKind.FunctionExpression: - case SyntaxKind.ArrowFunction: { - // Can't remove a non-last parameter in a callback. Can remove a parameter in code-fix-all if future parameters are also unused. - const { parameters } = parent; - const index = parameters.indexOf(p); - Debug.assert(index !== -1, "The parameter should already be in the list"); - return isFixAll - ? parameters.slice(index + 1).every(p => p.name.kind === SyntaxKind.Identifier && !p.symbol.isReferenced) - : index === parameters.length - 1; + case SyntaxKind.FunctionDeclaration: { + if (parent.name && isCallbackLike(checker, sourceFile, parent.name)) { + return isLastParameter(parent, parameter, isFixAll); + } + return true; } + case SyntaxKind.FunctionExpression: + case SyntaxKind.ArrowFunction: + // Can't remove a non-last parameter in a callback. Can remove a parameter in code-fix-all if future parameters are also unused. + return isLastParameter(parent, parameter, isFixAll); case SyntaxKind.SetAccessor: // Setter must have a parameter @@ -279,4 +274,18 @@ namespace ts.codefix { } }); } + + function isCallbackLike(checker: TypeChecker, sourceFile: SourceFile, name: Identifier): boolean { + return !!FindAllReferences.Core.eachSymbolReferenceInFile(name, checker, sourceFile, reference => + isIdentifier(reference) && isCallExpression(reference.parent) && reference.parent.arguments.indexOf(reference) >= 0); + } + + function isLastParameter(func: FunctionLikeDeclaration, parameter: ParameterDeclaration, isFixAll: boolean): boolean { + const parameters = func.parameters; + const index = parameters.indexOf(parameter); + Debug.assert(index !== -1, "The parameter should already be in the list"); + return isFixAll ? + parameters.slice(index + 1).every(p => isIdentifier(p.name) && !p.symbol.isReferenced) : + index === parameters.length - 1; + } } diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index 6d94711b43b..4600dfcd9b0 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -491,31 +491,36 @@ namespace ts.codefix { function getFixesInfoForNonUMDImport({ sourceFile, program, cancellationToken, host, preferences }: CodeFixContextBase, symbolToken: Identifier, useAutoImportProvider: boolean): FixesInfo | undefined { const checker = program.getTypeChecker(); - // If we're at ``, we must check if `Foo` is already in scope, and if so, get an import for `React` instead. - const symbolName = isJsxOpeningLikeElement(symbolToken.parent) - && symbolToken.parent.tagName === symbolToken - && (isIntrinsicJsxName(symbolToken.text) || checker.resolveName(symbolToken.text, symbolToken, SymbolFlags.All, /*excludeGlobals*/ false)) - ? checker.getJsxNamespace(sourceFile) - : symbolToken.text; + const symbolName = getSymbolName(sourceFile, checker, symbolToken); // "default" is a keyword and not a legal identifier for the import, so we don't expect it here Debug.assert(symbolName !== InternalSymbolName.Default, "'default' isn't a legal identifier and couldn't occur here"); const compilerOptions = program.getCompilerOptions(); const preferTypeOnlyImport = compilerOptions.importsNotUsedAsValues === ImportsNotUsedAsValues.Error && isValidTypeOnlyAliasUseSite(symbolToken); const useRequire = shouldUseRequire(sourceFile, compilerOptions); - const exportInfos = getExportInfos(symbolName, getMeaningFromLocation(symbolToken), cancellationToken, sourceFile, checker, program, useAutoImportProvider, host); + const exportInfos = getExportInfos(symbolName, getMeaningFromLocation(symbolToken), cancellationToken, sourceFile, program, useAutoImportProvider, host); const fixes = arrayFrom(flatMapIterator(exportInfos.entries(), ([_, exportInfos]) => getFixForImport(exportInfos, symbolName, symbolToken.getStart(sourceFile), preferTypeOnlyImport, useRequire, program, sourceFile, host, preferences))); return { fixes, symbolName }; } + function getSymbolName(sourceFile: SourceFile, checker: TypeChecker, symbolToken: Identifier): string { + const parent = symbolToken.parent; + if ((isJsxOpeningLikeElement(parent) || isJsxClosingElement(parent)) && parent.tagName === symbolToken) { + const jsxNamespace = checker.getJsxNamespace(sourceFile); + if (isIntrinsicJsxName(symbolToken.text) || !checker.resolveName(jsxNamespace, parent, SymbolFlags.Value, /*excludeGlobals*/ true)) { + return jsxNamespace; + } + } + return symbolToken.text; + } + // Returns a map from an exported symbol's ID to a list of every way it's (re-)exported. function getExportInfos( symbolName: string, currentTokenMeaning: SemanticMeaning, cancellationToken: CancellationToken, sourceFile: SourceFile, - checker: TypeChecker, program: Program, useAutoImportProvider: boolean, host: LanguageServiceHost @@ -523,21 +528,22 @@ namespace ts.codefix { // For each original symbol, keep all re-exports of that symbol together so we can call `getCodeActionsForImport` on the whole group at once. // Maps symbol id to info for modules providing that symbol (original export + re-exports). const originalSymbolToExportInfos = createMultiMap(); - function addSymbol(moduleSymbol: Symbol, exportedSymbol: Symbol, importKind: ImportKind): void { + function addSymbol(moduleSymbol: Symbol, exportedSymbol: Symbol, importKind: ImportKind, checker: TypeChecker): void { originalSymbolToExportInfos.add(getUniqueSymbolId(exportedSymbol, checker).toString(), { moduleSymbol, importKind, exportedSymbolIsTypeOnly: isTypeOnlySymbol(exportedSymbol, checker) }); } - forEachExternalModuleToImportFrom(program, host, sourceFile, /*filterByPackageJson*/ true, useAutoImportProvider, moduleSymbol => { + forEachExternalModuleToImportFrom(program, host, sourceFile, /*filterByPackageJson*/ true, useAutoImportProvider, (moduleSymbol, _, program) => { + const checker = program.getTypeChecker(); cancellationToken.throwIfCancellationRequested(); const defaultInfo = getDefaultLikeExportInfo(sourceFile, moduleSymbol, checker, program.getCompilerOptions()); if (defaultInfo && defaultInfo.name === symbolName && symbolHasMeaning(defaultInfo.symbolForMeaning, currentTokenMeaning)) { - addSymbol(moduleSymbol, defaultInfo.symbol, defaultInfo.kind); + addSymbol(moduleSymbol, defaultInfo.symbol, defaultInfo.kind, checker); } // check exports with the same name const exportSymbolWithIdenticalName = checker.tryGetMemberInModuleExportsAndProperties(symbolName, moduleSymbol); if (exportSymbolWithIdenticalName && symbolHasMeaning(exportSymbolWithIdenticalName, currentTokenMeaning)) { - addSymbol(moduleSymbol, exportSymbolWithIdenticalName, ImportKind.Named); + addSymbol(moduleSymbol, exportSymbolWithIdenticalName, ImportKind.Named, checker); } }); return originalSymbolToExportInfos; @@ -694,7 +700,7 @@ namespace ts.codefix { } else if (existingSpecifiers?.length) { for (const spec of newSpecifiers) { - changes.insertNodeAtEndOfList(sourceFile, existingSpecifiers, spec); + changes.insertNodeInListAfter(sourceFile, last(existingSpecifiers), spec, existingSpecifiers); } } else { diff --git a/src/services/completions.ts b/src/services/completions.ts index c7310e0c8b3..b7ac7e26925 100644 --- a/src/services/completions.ts +++ b/src/services/completions.ts @@ -1,13 +1,14 @@ /* @internal */ namespace ts.Completions { export enum SortText { - LocationPriority = "0", - OptionalMember = "1", - MemberDeclaredBySpreadAssignment = "2", - SuggestedClassMembers = "3", - GlobalsOrKeywords = "4", - AutoImportSuggestions = "5", - JavascriptIdentifiers = "6" + LocalDeclarationPriority = "0", + LocationPriority = "1", + OptionalMember = "2", + MemberDeclaredBySpreadAssignment = "3", + SuggestedClassMembers = "4", + GlobalsOrKeywords = "5", + AutoImportSuggestions = "6", + JavascriptIdentifiers = "7" } export type Log = (message: string) => void; @@ -209,6 +210,11 @@ namespace ts.Completions { return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: false, entries }; } + function getOptionalReplacementSpan(location: Node | undefined) { + // StringLiteralLike locations are handled separately in stringCompletions.ts + return location?.kind === SyntaxKind.Identifier ? createTextSpanFromNode(location) : undefined; + } + function completionInfoFromData(sourceFile: SourceFile, typeChecker: TypeChecker, compilerOptions: CompilerOptions, log: Log, completionData: CompletionData, preferences: UserPreferences): CompletionInfo | undefined { const { symbols, @@ -241,7 +247,7 @@ namespace ts.Completions { kindModifiers: undefined, sortText: SortText.LocationPriority, }; - return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: false, entries: [entry] }; + return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: false, optionalReplacementSpan: getOptionalReplacementSpan(location), entries: [entry] }; } const entries: CompletionEntry[] = []; @@ -305,7 +311,13 @@ namespace ts.Completions { entries.push(createCompletionEntryForLiteral(literal, preferences)); } - return { isGlobalCompletion: isInSnippetScope, isMemberCompletion: isMemberCompletionKind(completionKind), isNewIdentifierLocation, entries }; + return { + isGlobalCompletion: isInSnippetScope, + isMemberCompletion: isMemberCompletionKind(completionKind), + isNewIdentifierLocation, + optionalReplacementSpan: getOptionalReplacementSpan(location), + entries + }; } function isUncheckedFile(sourceFile: SourceFile, compilerOptions: CompilerOptions): boolean { @@ -1038,7 +1050,20 @@ namespace ts.Completions { } break; + case SyntaxKind.JsxExpression: + // For `
`, `parent` will be `{true}` and `previousToken` will be `}` + if (previousToken.kind === SyntaxKind.CloseBraceToken && currentToken.kind === SyntaxKind.GreaterThanToken) { + isJsxIdentifierExpected = true; + } + break; + case SyntaxKind.JsxAttribute: + // For `
`, `parent` will be JsxAttribute and `previousToken` will be its initializer + if ((parent as JsxAttribute).initializer === previousToken && + previousToken.end < position) { + isJsxIdentifierExpected = true; + break; + } switch (previousToken.kind) { case SyntaxKind.EqualsToken: isJsxInitializer = true; @@ -1149,13 +1174,12 @@ namespace ts.Completions { || isPartOfTypeNode(node.parent) || isPossiblyTypeArgumentPosition(contextToken, sourceFile, typeChecker); const isRhsOfImportDeclaration = isInRightSideOfInternalImportEqualsDeclaration(node); - if (isEntityName(node) || isImportType) { + if (isEntityName(node) || isImportType || isPropertyAccessExpression(node)) { const isNamespaceName = isModuleDeclaration(node.parent); if (isNamespaceName) isNewIdentifierLocation = true; let symbol = typeChecker.getSymbolAtLocation(node); if (symbol) { symbol = skipAlias(symbol, typeChecker); - if (symbol.flags & (SymbolFlags.Module | SymbolFlags.Enum)) { // Extract module or enum members const exportedSymbols = typeChecker.getExportsOfModule(symbol); @@ -1247,7 +1271,7 @@ namespace ts.Completions { else { for (const symbol of type.getApparentProperties()) { if (typeChecker.isValidPropertyAccessForCompletions(propertyAccess, type, symbol)) { - addPropertySymbol(symbol, /*insertAwait*/ false, insertQuestionDot); + addPropertySymbol(symbol, /* insertAwait */ false, insertQuestionDot); } } } @@ -1284,14 +1308,22 @@ namespace ts.Completions { } else if (preferences.includeCompletionsWithInsertText) { addSymbolOriginInfo(symbol); + addSymbolSortInfo(symbol); symbols.push(symbol); } } else { addSymbolOriginInfo(symbol); + addSymbolSortInfo(symbol); symbols.push(symbol); } + function addSymbolSortInfo(symbol: Symbol) { + if (isStaticProperty(symbol)) { + symbolToSortTextMap[getSymbolId(symbol)] = SortText.LocalDeclarationPriority; + } + } + function addSymbolOriginInfo(symbol: Symbol) { if (preferences.includeCompletionsWithInsertText) { if (insertAwait && !symbolToOriginInfoMap[getSymbolId(symbol)]) { @@ -2012,7 +2044,9 @@ namespace ts.Completions { // List of property symbols of base type that are not private and already implemented const baseSymbols = flatMap(getAllSuperTypeNodes(decl), baseTypeNode => { const type = typeChecker.getTypeAtLocation(baseTypeNode); - return type && typeChecker.getPropertiesOfType(classElementModifierFlags & ModifierFlags.Static ? typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl) : type); + return classElementModifierFlags & ModifierFlags.Static ? + type?.symbol && typeChecker.getPropertiesOfType(typeChecker.getTypeOfSymbolAtLocation(type.symbol, decl)) : + type && typeChecker.getPropertiesOfType(type); }); symbols = filterClassMembersList(baseSymbols, decl.members, classElementModifierFlags); } @@ -2551,7 +2585,6 @@ namespace ts.Completions { || kind === SyntaxKind.ModuleKeyword || kind === SyntaxKind.TypeKeyword || kind === SyntaxKind.NamespaceKeyword - || kind === SyntaxKind.AsKeyword || isTypeKeyword(kind) && kind !== SyntaxKind.UndefinedKeyword; case KeywordCompletionFilters.FunctionLikeBodyKeywords: return isFunctionLikeBodyKeyword(kind); @@ -2626,6 +2659,7 @@ namespace ts.Completions { function isFunctionLikeBodyKeyword(kind: SyntaxKind) { return kind === SyntaxKind.AsyncKeyword || kind === SyntaxKind.AwaitKeyword + || kind === SyntaxKind.AsKeyword || !isContextualKeyword(kind) && !isClassMemberCompletionKeyword(kind); } @@ -2792,4 +2826,8 @@ namespace ts.Completions { } return false; } + + function isStaticProperty(symbol: Symbol) { + return !!(symbol.valueDeclaration && getEffectiveModifierFlags(symbol.valueDeclaration) & ModifierFlags.Static && isClassLike(symbol.valueDeclaration.parent)); + } } diff --git a/src/services/documentHighlights.ts b/src/services/documentHighlights.ts index 6ed27e2beee..b0282393cce 100644 --- a/src/services/documentHighlights.ts +++ b/src/services/documentHighlights.ts @@ -204,7 +204,7 @@ namespace ts { function getNodesToSearchForModifier(declaration: Node, modifierFlag: ModifierFlags): readonly Node[] | undefined { // Types of node whose children might have modifiers. - const container = declaration.parent as ModuleBlock | SourceFile | Block | CaseClause | DefaultClause | ConstructorDeclaration | MethodDeclaration | FunctionDeclaration | ObjectTypeDeclaration; + const container = declaration.parent as ModuleBlock | SourceFile | Block | CaseClause | DefaultClause | ConstructorDeclaration | MethodDeclaration | FunctionDeclaration | ObjectTypeDeclaration | ObjectLiteralExpression; switch (container.kind) { case SyntaxKind.ModuleBlock: case SyntaxKind.SourceFile: @@ -240,6 +240,11 @@ namespace ts { return [...nodes, container]; } return nodes; + + // Syntactically invalid positions that the parser might produce anyway + case SyntaxKind.ObjectLiteralExpression: + return undefined; + default: Debug.assertNever(container, "Invalid container kind."); } diff --git a/src/services/formatting/formatting.ts b/src/services/formatting/formatting.ts index 951ad5e5bba..424dd2e8957 100644 --- a/src/services/formatting/formatting.ts +++ b/src/services/formatting/formatting.ts @@ -720,6 +720,9 @@ namespace ts.formatting { // proceed any parent tokens that are located prior to child.getStart() const tokenInfo = formattingScanner.readTokenInfo(node); if (tokenInfo.token.end > childStartPos) { + if (tokenInfo.token.pos > childStartPos) { + formattingScanner.skipToStartOf(child); + } // stop when formatting scanner advances past the beginning of the child break; } @@ -731,13 +734,15 @@ namespace ts.formatting { return inheritedIndentation; } - // JSX text shouldn't affect indenting - if (isToken(child) && child.kind !== SyntaxKind.JsxText) { + if (isToken(child)) { // if child node is a token, it does not impact indentation, proceed it using parent indentation scope rules const tokenInfo = formattingScanner.readTokenInfo(child); - Debug.assert(tokenInfo.token.end === child.end, "Token end is child end"); - consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child); - return inheritedIndentation; + // JSX text shouldn't affect indenting + if (child.kind !== SyntaxKind.JsxText) { + Debug.assert(tokenInfo.token.end === child.end, "Token end is child end"); + consumeTokenAndAdvanceScanner(tokenInfo, node, parentDynamicIndentation, child); + return inheritedIndentation; + } } const effectiveParentStartLine = child.kind === SyntaxKind.Decorator ? childStartLine : undecoratedParentStartLine; @@ -1092,10 +1097,6 @@ namespace ts.formatting { const nonWhitespaceColumnInFirstPart = SmartIndenter.findFirstNonWhitespaceCharacterAndColumn(startLinePos, parts[0].pos, sourceFile, options); - if (indentation === nonWhitespaceColumnInFirstPart.column && !jsxTextStyleIndent) { - return; - } - let startIndex = 0; if (firstLineIsIndented) { startIndex = 1; diff --git a/src/services/formatting/formattingScanner.ts b/src/services/formatting/formattingScanner.ts index 64e257f4a08..5a6013c4e75 100644 --- a/src/services/formatting/formattingScanner.ts +++ b/src/services/formatting/formattingScanner.ts @@ -12,6 +12,7 @@ namespace ts.formatting { getCurrentLeadingTrivia(): TextRangeWithKind[] | undefined; lastTrailingTriviaWasNewLine(): boolean; skipToEndOf(node: Node): void; + skipToStartOf(node: Node): void; } const enum ScanAction { @@ -47,6 +48,7 @@ namespace ts.formatting { getCurrentLeadingTrivia: () => leadingTrivia, lastTrailingTriviaWasNewLine: () => wasNewLine, skipToEndOf, + skipToStartOf, }); lastTokenInfo = undefined; @@ -298,5 +300,15 @@ namespace ts.formatting { leadingTrivia = undefined; trailingTrivia = undefined; } + + function skipToStartOf(node: Node): void { + scanner.setTextPos(node.pos); + savedPos = scanner.getStartPos(); + lastScanAction = undefined; + lastTokenInfo = undefined; + wasNewLine = false; + leadingTrivia = undefined; + trailingTrivia = undefined; + } } } diff --git a/src/services/formatting/smartIndenter.ts b/src/services/formatting/smartIndenter.ts index 23011643811..b8af97350f7 100644 --- a/src/services/formatting/smartIndenter.ts +++ b/src/services/formatting/smartIndenter.ts @@ -558,11 +558,15 @@ namespace ts.formatting { case SyntaxKind.FunctionDeclaration: case SyntaxKind.FunctionExpression: case SyntaxKind.MethodDeclaration: - case SyntaxKind.ArrowFunction: case SyntaxKind.Constructor: case SyntaxKind.GetAccessor: case SyntaxKind.SetAccessor: return childKind !== SyntaxKind.Block; + case SyntaxKind.ArrowFunction: + if (sourceFile && childKind === SyntaxKind.ParenthesizedExpression) { + return rangeIsOnOneLine(sourceFile, child!); + } + return childKind !== SyntaxKind.Block; case SyntaxKind.ExportDeclaration: return childKind !== SyntaxKind.NamedExports; case SyntaxKind.ImportDeclaration: diff --git a/src/services/goToDefinition.ts b/src/services/goToDefinition.ts index 4b39a90c880..f0ec33c8884 100644 --- a/src/services/goToDefinition.ts +++ b/src/services/goToDefinition.ts @@ -34,9 +34,7 @@ namespace ts.GoToDefinition { const sigInfo = createDefinitionFromSignatureDeclaration(typeChecker, calledDeclaration); // For a function, if this is the original function definition, return just sigInfo. // If this is the original constructor definition, parent is the class. - if (typeChecker.getRootSymbols(symbol).some(s => symbolMatchesSignature(s, calledDeclaration)) || - // TODO: GH#25533 Following check shouldn't be necessary if 'require' is an alias - symbol.declarations && symbol.declarations.some(d => isVariableDeclaration(d) && !!d.initializer && isRequireCall(d.initializer, /*checkArgumentIsStringLiteralLike*/ false))) { + if (typeChecker.getRootSymbols(symbol).some(s => symbolMatchesSignature(s, calledDeclaration))) { return [sigInfo]; } else { @@ -210,15 +208,6 @@ namespace ts.GoToDefinition { return aliased; } } - if (symbol && isInJSFile(node)) { - const requireCall = forEach(symbol.declarations, d => isVariableDeclaration(d) && !!d.initializer && isRequireCall(d.initializer, /*checkArgumentIsStringLiteralLike*/ true) ? d.initializer : undefined); - if (requireCall) { - const moduleSymbol = checker.getSymbolAtLocation(requireCall.arguments[0]); - if (moduleSymbol) { - return checker.resolveExternalModuleSymbol(moduleSymbol); - } - } - } return symbol; } @@ -240,6 +229,9 @@ namespace ts.GoToDefinition { return true; case SyntaxKind.ImportSpecifier: return declaration.parent.kind === SyntaxKind.NamedImports; + case SyntaxKind.BindingElement: + case SyntaxKind.VariableDeclaration: + return isInJSFile(declaration) && isRequireVariableDeclaration(declaration, /*requireStringLiteralLikeArgument*/ true); default: return false; } diff --git a/src/services/importTracker.ts b/src/services/importTracker.ts index 59c7e8c2745..41df9bcd583 100644 --- a/src/services/importTracker.ts +++ b/src/services/importTracker.ts @@ -93,9 +93,6 @@ namespace ts.FindAllReferences { break; } } - - // Don't support re-exporting 'require()' calls, so just add a single indirect user. - addIndirectUser(direct.getSourceFile()); } break; @@ -607,6 +604,8 @@ namespace ts.FindAllReferences { case SyntaxKind.NamespaceImport: Debug.assert((parent as ImportClause | NamespaceImport).name === node); return true; + case SyntaxKind.BindingElement: + return isInJSFile(node) && isRequireVariableDeclaration(parent, /*requireStringLiteralLikeArgument*/ true); default: return false; } @@ -628,6 +627,14 @@ namespace ts.FindAllReferences { if (isExportSpecifier(declaration) && !declaration.propertyName && !declaration.parent.parent.moduleSpecifier) { return checker.getExportSpecifierLocalTargetSymbol(declaration)!; } + else if (isPropertyAccessExpression(declaration) && isModuleExportsAccessExpression(declaration.expression) && !isPrivateIdentifier(declaration.name)) { + return checker.getExportSpecifierLocalTargetSymbol(declaration.name)!; + } + else if (isShorthandPropertyAssignment(declaration) + && isBinaryExpression(declaration.parent.parent) + && getAssignmentDeclarationKind(declaration.parent.parent) === AssignmentDeclarationKind.ModuleExports) { + return checker.getExportSpecifierLocalTargetSymbol(declaration.name)!; + } } } return symbol; diff --git a/src/services/jsDoc.ts b/src/services/jsDoc.ts index 3115109572a..11b876a6841 100644 --- a/src/services/jsDoc.ts +++ b/src/services/jsDoc.ts @@ -138,7 +138,8 @@ namespace ts.JsDoc { case SyntaxKind.JSDocCallbackTag: case SyntaxKind.JSDocPropertyTag: case SyntaxKind.JSDocParameterTag: - const { name } = tag as JSDocTypedefTag | JSDocPropertyTag | JSDocParameterTag; + case SyntaxKind.JSDocSeeTag: + const { name } = tag as JSDocTypedefTag | JSDocPropertyTag | JSDocParameterTag | JSDocSeeTag; return name ? withNode(name) : comment; default: return comment; @@ -163,7 +164,7 @@ namespace ts.JsDoc { name: tagName, kind: ScriptElementKind.keyword, kindModifiers: "", - sortText: "0", + sortText: Completions.SortText.LocationPriority, }; })); } @@ -176,7 +177,7 @@ namespace ts.JsDoc { name: `@${tagName}`, kind: ScriptElementKind.keyword, kindModifiers: "", - sortText: "0" + sortText: Completions.SortText.LocationPriority }; })); } @@ -211,7 +212,7 @@ namespace ts.JsDoc { return undefined; } - return { name, kind: ScriptElementKind.parameterElement, kindModifiers: "", sortText: "0" }; + return { name, kind: ScriptElementKind.parameterElement, kindModifiers: "", sortText: Completions.SortText.LocationPriority }; }); } diff --git a/src/services/navigationBar.ts b/src/services/navigationBar.ts index 4f757be676c..4704e86846b 100644 --- a/src/services/navigationBar.ts +++ b/src/services/navigationBar.ts @@ -310,7 +310,7 @@ namespace ts.NavigationBar { case SyntaxKind.ExportAssignment: { const expression = (node).expression; - const child = isObjectLiteralExpression(expression) ? expression : + const child = isObjectLiteralExpression(expression) || isCallExpression(expression) ? expression : isArrowFunction(expression) || isFunctionExpression(expression) ? expression.body : undefined; if (child) { startNode(node); @@ -843,16 +843,11 @@ namespace ts.NavigationBar { } // Otherwise, we need to aggregate each identifier to build up the qualified name. - const result: string[] = []; - - result.push(getTextOfIdentifierOrLiteral(moduleDeclaration.name)); - + const result = [getTextOfIdentifierOrLiteral(moduleDeclaration.name)]; while (moduleDeclaration.body && moduleDeclaration.body.kind === SyntaxKind.ModuleDeclaration) { moduleDeclaration = moduleDeclaration.body; - result.push(getTextOfIdentifierOrLiteral(moduleDeclaration.name)); } - return result.join("."); } diff --git a/src/services/outliningElementsCollector.ts b/src/services/outliningElementsCollector.ts index a001d9c68f2..0baacad43bf 100644 --- a/src/services/outliningElementsCollector.ts +++ b/src/services/outliningElementsCollector.ts @@ -34,14 +34,10 @@ namespace ts.OutliningElementsCollector { if (depthRemaining === 0) return; cancellationToken.throwIfCancellationRequested(); - if (isDeclaration(n) || n.kind === SyntaxKind.EndOfFileToken) { + if (isDeclaration(n) || isVariableStatement(n) || n.kind === SyntaxKind.EndOfFileToken) { addOutliningForLeadingCommentsForNode(n, sourceFile, cancellationToken, out); } - if (isFunctionExpressionAssignedToVariable(n)) { - addOutliningForLeadingCommentsForNode(n.parent.parent.parent, sourceFile, cancellationToken, out); - } - if (isFunctionLike(n) && isBinaryExpression(n.parent) && isPropertyAccessExpression(n.parent.left)) { addOutliningForLeadingCommentsForNode(n.parent.left, sourceFile, cancellationToken, out); } @@ -70,14 +66,6 @@ namespace ts.OutliningElementsCollector { } depthRemaining++; } - - function isFunctionExpressionAssignedToVariable(n: Node) { - if (!isFunctionExpression(n) && !isArrowFunction(n)) { - return false; - } - const ancestor = findAncestor(n, isVariableStatement); - return !!ancestor && getSingleInitializerOfVariableStatementOrPropertyDeclaration(ancestor) === n; - } } function addRegionOutliningSpans(sourceFile: SourceFile, out: Push): void { diff --git a/src/services/refactors/convertExport.ts b/src/services/refactors/convertExport.ts index 1ab52fadc9b..6912979261a 100644 --- a/src/services/refactors/convertExport.ts +++ b/src/services/refactors/convertExport.ts @@ -110,10 +110,11 @@ namespace ts.refactor { changes.insertNodeAfter(exportingSourceFile, exportKeyword, factory.createToken(SyntaxKind.DefaultKeyword)); break; case SyntaxKind.VariableStatement: - // If 'x' isn't used in this file, `export const x = 0;` --> `export default 0;` - if (!FindAllReferences.Core.isSymbolReferencedInFile(exportName, checker, exportingSourceFile)) { + // If 'x' isn't used in this file and doesn't have type definition, `export const x = 0;` --> `export default 0;` + const decl = first(exportNode.declarationList.declarations); + if (!FindAllReferences.Core.isSymbolReferencedInFile(exportName, checker, exportingSourceFile) && !decl.type) { // We checked in `getInfo` that an initializer exists. - changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDefault(Debug.checkDefined(first(exportNode.declarationList.declarations).initializer, "Initializer was previously known to be present"))); + changes.replaceNode(exportingSourceFile, exportNode, factory.createExportDefault(Debug.checkDefined(decl.initializer, "Initializer was previously known to be present"))); break; } // falls through diff --git a/src/services/refactors/convertToOptionalChainExpression.ts b/src/services/refactors/convertToOptionalChainExpression.ts new file mode 100644 index 00000000000..52365fc0ba5 --- /dev/null +++ b/src/services/refactors/convertToOptionalChainExpression.ts @@ -0,0 +1,306 @@ +/* @internal */ +namespace ts.refactor.convertToOptionalChainExpression { + const refactorName = "Convert to optional chain expression"; + const convertToOptionalChainExpressionMessage = getLocaleSpecificMessage(Diagnostics.Convert_to_optional_chain_expression); + + registerRefactor(refactorName, { getAvailableActions, getEditsForAction }); + + function getAvailableActions(context: RefactorContext): readonly ApplicableRefactorInfo[] { + const info = getInfo(context, context.triggerReason === "invoked"); + if (!info) return emptyArray; + + if (!info.error) { + return [{ + name: refactorName, + description: convertToOptionalChainExpressionMessage, + actions: [{ + name: refactorName, + description: convertToOptionalChainExpressionMessage + }] + }]; + } + + if (context.preferences.provideRefactorNotApplicableReason) { + return [{ + name: refactorName, + description: convertToOptionalChainExpressionMessage, + actions: [{ + name: refactorName, + description: convertToOptionalChainExpressionMessage, + notApplicableReason: info.error + }] + }]; + } + return emptyArray; + } + + function getEditsForAction(context: RefactorContext, actionName: string): RefactorEditInfo | undefined { + const info = getInfo(context); + if (!info || !info.info) return undefined; + const edits = textChanges.ChangeTracker.with(context, t => + doChange(context.file, context.program.getTypeChecker(), t, Debug.checkDefined(info.info, "context must have info"), actionName) + ); + return { edits, renameFilename: undefined, renameLocation: undefined }; + } + + type InfoOrError = { + info: Info, + error?: never; + } | { + info?: never, + error: string; + }; + + type Occurrence = PropertyAccessExpression | ElementAccessExpression | Identifier; + + interface Info { + finalExpression: PropertyAccessExpression | ElementAccessExpression | CallExpression, + occurrences: Occurrence[], + expression: ValidExpression, + }; + + type ValidExpressionOrStatement = ValidExpression | ValidStatement; + + /** + * Types for which a "Convert to optional chain refactor" are offered. + */ + type ValidExpression = BinaryExpression | ConditionalExpression; + + /** + * Types of statements which are likely to include a valid expression for extraction. + */ + type ValidStatement = ExpressionStatement | ReturnStatement | VariableStatement; + + function isValidExpression(node: Node): node is ValidExpression { + return isBinaryExpression(node) || isConditionalExpression(node); + } + + function isValidStatement(node: Node): node is ValidStatement { + return isExpressionStatement(node) || isReturnStatement(node) || isVariableStatement(node); + } + + function isValidExpressionOrStatement(node: Node): node is ValidExpressionOrStatement { + return isValidExpression(node) || isValidStatement(node); + } + + function getInfo(context: RefactorContext, considerEmptySpans = true): InfoOrError | undefined { + const { file, program } = context; + const span = getRefactorContextSpan(context); + + const forEmptySpan = span.length === 0; + if (forEmptySpan && !considerEmptySpans) return undefined; + + // selecting fo[|o && foo.ba|]r should be valid, so adjust span to fit start and end tokens + const startToken = getTokenAtPosition(file, span.start); + const endToken = findTokenOnLeftOfPosition(file, span.start + span.length); + const adjustedSpan = createTextSpanFromBounds(startToken.pos, endToken && endToken.end >= startToken.pos ? endToken.getEnd() : startToken.getEnd()); + + const parent = forEmptySpan ? getValidParentNodeOfEmptySpan(startToken) : getValidParentNodeContainingSpan(startToken, adjustedSpan); + const expression = parent && isValidExpressionOrStatement(parent) ? getExpression(parent) : undefined; + if (!expression) return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_convertible_access_expression) }; + + const checker = program.getTypeChecker(); + return isConditionalExpression(expression) ? getConditionalInfo(expression, checker) : getBinaryInfo(expression); + } + + function getConditionalInfo(expression: ConditionalExpression, checker: TypeChecker): InfoOrError | undefined { + const condition = expression.condition; + const finalExpression = getFinalExpressionInChain(expression.whenTrue); + + if (!finalExpression || checker.isNullableType(checker.getTypeAtLocation(finalExpression))) { + return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_convertible_access_expression) }; + } + + if ((isPropertyAccessExpression(condition) || isIdentifier(condition)) + && getMatchingStart(condition, finalExpression.expression)) { + return { info: { finalExpression, occurrences: [condition], expression } }; + } + else if (isBinaryExpression(condition)) { + const occurrences = getOccurrencesInExpression(finalExpression.expression, condition); + return occurrences ? { info: { finalExpression, occurrences, expression } } : + { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_matching_access_expressions) }; + } + } + + function getBinaryInfo(expression: BinaryExpression): InfoOrError | undefined { + if (expression.operatorToken.kind !== SyntaxKind.AmpersandAmpersandToken) { + return { error: getLocaleSpecificMessage(Diagnostics.Can_only_convert_logical_AND_access_chains) }; + }; + const finalExpression = getFinalExpressionInChain(expression.right); + + if (!finalExpression) return { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_convertible_access_expression) }; + + const occurrences = getOccurrencesInExpression(finalExpression.expression, expression.left); + return occurrences ? { info: { finalExpression, occurrences, expression } } : + { error: getLocaleSpecificMessage(Diagnostics.Could_not_find_matching_access_expressions) }; + } + + /** + * Gets a list of property accesses that appear in matchTo and occur in sequence in expression. + */ + function getOccurrencesInExpression(matchTo: Expression, expression: Expression): Occurrence[] | undefined { + const occurrences: Occurrence[] = []; + while (isBinaryExpression(expression) && expression.operatorToken.kind === SyntaxKind.AmpersandAmpersandToken) { + const match = getMatchingStart(skipParentheses(matchTo), skipParentheses(expression.right)); + if (!match) { + break; + } + occurrences.push(match); + matchTo = match; + expression = expression.left; + } + const finalMatch = getMatchingStart(matchTo, expression); + if (finalMatch) { + occurrences.push(finalMatch); + } + return occurrences.length > 0 ? occurrences: undefined; + } + + /** + * Returns subchain if chain begins with subchain syntactically. + */ + function getMatchingStart(chain: Expression, subchain: Expression): PropertyAccessExpression | ElementAccessExpression | Identifier | undefined { + if (!isIdentifier(subchain) && !isPropertyAccessExpression(subchain) && !isElementAccessExpression(subchain)) { + return undefined; + } + return chainStartsWith(chain, subchain) ? subchain : undefined; + } + + /** + * Returns true if chain begins with subchain syntactically. + */ + function chainStartsWith(chain: Node, subchain: Node): boolean { + // skip until we find a matching identifier. + while (isCallExpression(chain) || isPropertyAccessExpression(chain) || isElementAccessExpression(chain)) { + if (getTextOfChainNode(chain) === getTextOfChainNode(subchain)) break; + chain = chain.expression; + } + // check that the chains match at each access. Call chains in subchain are not valid. + while ((isPropertyAccessExpression(chain) && isPropertyAccessExpression(subchain)) || + (isElementAccessExpression(chain) && isElementAccessExpression(subchain))) { + if (getTextOfChainNode(chain) !== getTextOfChainNode(subchain)) return false; + chain = chain.expression; + subchain = subchain.expression; + } + // check if we have reached a final identifier. + return isIdentifier(chain) && isIdentifier(subchain) && chain.getText() === subchain.getText(); + } + + function getTextOfChainNode(node: Node): string | undefined { + if (isIdentifier(node) || isStringOrNumericLiteralLike(node)) { + return node.getText(); + } + if (isPropertyAccessExpression(node)) { + return getTextOfChainNode(node.name); + } + if (isElementAccessExpression(node)) { + return getTextOfChainNode(node.argumentExpression); + } + return undefined; + } + + /** + * Find the least ancestor of the input node that is a valid type for extraction and contains the input span. + */ + function getValidParentNodeContainingSpan(node: Node, span: TextSpan): ValidExpressionOrStatement | undefined { + while (node.parent) { + if (isValidExpressionOrStatement(node) && span.length !== 0 && node.end >= span.start + span.length) { + return node; + } + node = node.parent; + } + return undefined; + } + + /** + * Finds an ancestor of the input node that is a valid type for extraction, skipping subexpressions. + */ + function getValidParentNodeOfEmptySpan(node: Node): ValidExpressionOrStatement | undefined { + while (node.parent) { + if (isValidExpressionOrStatement(node) && !isValidExpressionOrStatement(node.parent)) { + return node; + } + node = node.parent; + } + return undefined; + } + + /** + * Gets an expression of valid extraction type from a valid statement or expression. + */ + function getExpression(node: ValidExpressionOrStatement): ValidExpression | undefined { + if (isValidExpression(node)) { + return node; + } + if (isVariableStatement(node)) { + const variable = getSingleVariableOfVariableStatement(node); + const initializer = variable?.initializer; + return initializer && isValidExpression(initializer) ? initializer : undefined; + } + return node.expression && isValidExpression(node.expression) ? node.expression : undefined; + } + + /** + * Gets a property access expression which may be nested inside of a binary expression. The final + * expression in an && chain will occur as the right child of the parent binary expression, unless + * it is followed by a different binary operator. + * @param node the right child of a binary expression or a call expression. + */ + function getFinalExpressionInChain(node: Expression): CallExpression | PropertyAccessExpression | ElementAccessExpression | undefined { + // foo && |foo.bar === 1|; - here the right child of the && binary expression is another binary expression. + // the rightmost member of the && chain should be the leftmost child of that expression. + node = skipParentheses(node); + if (isBinaryExpression(node)) { + return getFinalExpressionInChain(node.left); + } + // foo && |foo.bar()()| - nested calls are treated like further accesses. + else if ((isPropertyAccessExpression(node) || isElementAccessExpression(node) || isCallExpression(node)) && !isOptionalChain(node)) { + return node; + } + return undefined; + } + + /** + * Creates an access chain from toConvert with '?.' accesses at expressions appearing in occurrences. + */ + function convertOccurrences(checker: TypeChecker, toConvert: Expression, occurrences: Occurrence[]): Expression { + if (isPropertyAccessExpression(toConvert) || isElementAccessExpression(toConvert) || isCallExpression(toConvert)) { + const chain = convertOccurrences(checker, toConvert.expression, occurrences); + const lastOccurrence = occurrences.length > 0 ? occurrences[occurrences.length - 1] : undefined; + const isOccurrence = lastOccurrence?.getText() === toConvert.expression.getText(); + if (isOccurrence) occurrences.pop(); + if (isCallExpression(toConvert)) { + return isOccurrence ? + factory.createCallChain(chain, factory.createToken(SyntaxKind.QuestionDotToken), toConvert.typeArguments, toConvert.arguments) : + factory.createCallChain(chain, toConvert.questionDotToken, toConvert.typeArguments, toConvert.arguments); + } + else if (isPropertyAccessExpression(toConvert)) { + return isOccurrence ? + factory.createPropertyAccessChain(chain, factory.createToken(SyntaxKind.QuestionDotToken), toConvert.name) : + factory.createPropertyAccessChain(chain, toConvert.questionDotToken, toConvert.name); + } + else if (isElementAccessExpression(toConvert)) { + return isOccurrence ? + factory.createElementAccessChain(chain, factory.createToken(SyntaxKind.QuestionDotToken), toConvert.argumentExpression) : + factory.createElementAccessChain(chain, toConvert.questionDotToken, toConvert.argumentExpression); + } + } + return toConvert; + } + + function doChange(sourceFile: SourceFile, checker: TypeChecker, changes: textChanges.ChangeTracker, info: Info, _actionName: string): void { + const { finalExpression, occurrences, expression } = info; + const firstOccurrence = occurrences[occurrences.length - 1]; + const convertedChain = convertOccurrences(checker, finalExpression, occurrences); + if (convertedChain && (isPropertyAccessExpression(convertedChain) || isElementAccessExpression(convertedChain) || isCallExpression(convertedChain))) { + if (isBinaryExpression(expression)) { + changes.replaceNodeRange(sourceFile, firstOccurrence, finalExpression, convertedChain); + } + else if (isConditionalExpression(expression)) { + changes.replaceNode(sourceFile, expression, + factory.createBinaryExpression(convertedChain, factory.createToken(SyntaxKind.QuestionQuestionToken), expression.whenFalse) + ); + } + } + } +} diff --git a/src/services/refactors/extractSymbol.ts b/src/services/refactors/extractSymbol.ts index c2234a891dd..73c8ca01e4c 100644 --- a/src/services/refactors/extractSymbol.ts +++ b/src/services/refactors/extractSymbol.ts @@ -439,7 +439,7 @@ namespace ts.refactor.extractSymbol { // TODO: GH#18217 Silly to use `errors ||` since it's definitely not defined (see top of `visit`) // Also, if we're only pushing one error, just use `let error: Diagnostic | undefined`! // Also TODO: GH#19956 - (errors || (errors = [] as Diagnostic[])).push(createDiagnosticForNode(node, Messages.cannotExtractExportedEntity)); + (errors ||= []).push(createDiagnosticForNode(node, Messages.cannotExtractExportedEntity)); return true; } declarations.push(node.symbol); @@ -448,7 +448,10 @@ namespace ts.refactor.extractSymbol { // Some things can't be extracted in certain situations switch (node.kind) { case SyntaxKind.ImportDeclaration: - (errors || (errors = [] as Diagnostic[])).push(createDiagnosticForNode(node, Messages.cannotExtractImport)); + (errors ||= []).push(createDiagnosticForNode(node, Messages.cannotExtractImport)); + return true; + case SyntaxKind.ExportAssignment: + (errors ||= []).push(createDiagnosticForNode(node, Messages.cannotExtractExportedEntity)); return true; case SyntaxKind.SuperKeyword: // For a super *constructor call*, we have to be extracting the entire class, @@ -457,7 +460,7 @@ namespace ts.refactor.extractSymbol { // Super constructor call const containingClass = getContainingClass(node)!; // TODO:GH#18217 if (containingClass.pos < span.start || containingClass.end >= (span.start + span.length)) { - (errors || (errors = [] as Diagnostic[])).push(createDiagnosticForNode(node, Messages.cannotExtractSuper)); + (errors ||= []).push(createDiagnosticForNode(node, Messages.cannotExtractSuper)); return true; } } @@ -483,7 +486,7 @@ namespace ts.refactor.extractSymbol { case SyntaxKind.FunctionDeclaration: if (isSourceFile(node.parent) && node.parent.externalModuleIndicator === undefined) { // You cannot extract global declarations - (errors || (errors = [] as Diagnostic[])).push(createDiagnosticForNode(node, Messages.functionWillNotBeVisibleInTheNewScope)); + (errors ||= []).push(createDiagnosticForNode(node, Messages.functionWillNotBeVisibleInTheNewScope)); } // falls through case SyntaxKind.ClassExpression: @@ -542,13 +545,13 @@ namespace ts.refactor.extractSymbol { if (label) { if (!contains(seenLabels, label.escapedText)) { // attempts to jump to label that is not in range to be extracted - (errors || (errors = [] as Diagnostic[])).push(createDiagnosticForNode(node, Messages.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)); + (errors ||= []).push(createDiagnosticForNode(node, Messages.cannotExtractRangeContainingLabeledBreakOrContinueStatementWithTargetOutsideOfTheRange)); } } else { if (!(permittedJumps & (node.kind === SyntaxKind.BreakStatement ? PermittedJumps.Break : PermittedJumps.Continue))) { // attempt to break or continue in a forbidden context - (errors || (errors = [] as Diagnostic[])).push(createDiagnosticForNode(node, Messages.cannotExtractRangeContainingConditionalBreakOrContinueStatements)); + (errors ||= []).push(createDiagnosticForNode(node, Messages.cannotExtractRangeContainingConditionalBreakOrContinueStatements)); } } break; @@ -564,7 +567,7 @@ namespace ts.refactor.extractSymbol { rangeFacts |= RangeFacts.HasReturn; } else { - (errors || (errors = [] as Diagnostic[])).push(createDiagnosticForNode(node, Messages.cannotExtractRangeContainingConditionalReturnStatement)); + (errors ||= []).push(createDiagnosticForNode(node, Messages.cannotExtractRangeContainingConditionalReturnStatement)); } break; default: diff --git a/src/services/refactors/extractType.ts b/src/services/refactors/extractType.ts index 6f144cfe40b..7f528ae245d 100644 --- a/src/services/refactors/extractType.ts +++ b/src/services/refactors/extractType.ts @@ -140,7 +140,7 @@ namespace ts.refactor { if (symbol) { const declaration = cast(first(symbol.declarations), isTypeParameterDeclaration); if (rangeContainsSkipTrivia(statement, declaration, file) && !rangeContainsSkipTrivia(selection, declaration, file)) { - result.push(declaration); + pushIfUnique(result, declaration); } } } @@ -190,7 +190,7 @@ namespace ts.refactor { selection ); changes.insertNodeBefore(file, firstStatement, ignoreSourceNewlines(newTypeNode), /* blankLineBetween */ true); - changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map(id => factory.createTypeReferenceNode(id.name, /* typeArguments */ undefined)))); + changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map(id => factory.createTypeReferenceNode(id.name, /* typeArguments */ undefined))), { leadingTriviaOption: textChanges.LeadingTriviaOption.Exclude, trailingTriviaOption: textChanges.TrailingTriviaOption.ExcludeWhitespace }); } function doInterfaceChange(changes: textChanges.ChangeTracker, file: SourceFile, name: string, info: InterfaceInfo) { @@ -204,8 +204,9 @@ namespace ts.refactor { /* heritageClauses */ undefined, typeElements ); + setTextRange(newTypeNode, typeElements[0]?.parent); changes.insertNodeBefore(file, firstStatement, ignoreSourceNewlines(newTypeNode), /* blankLineBetween */ true); - changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map(id => factory.createTypeReferenceNode(id.name, /* typeArguments */ undefined)))); + changes.replaceNode(file, selection, factory.createTypeReferenceNode(name, typeParameters.map(id => factory.createTypeReferenceNode(id.name, /* typeArguments */ undefined))), { leadingTriviaOption: textChanges.LeadingTriviaOption.Exclude, trailingTriviaOption: textChanges.TrailingTriviaOption.ExcludeWhitespace }); } function doTypedefChange(changes: textChanges.ChangeTracker, file: SourceFile, name: string, info: Info) { diff --git a/src/services/refactors/moveToNewFile.ts b/src/services/refactors/moveToNewFile.ts index fd0cf852da3..8c3f4504925 100644 --- a/src/services/refactors/moveToNewFile.ts +++ b/src/services/refactors/moveToNewFile.ts @@ -65,20 +65,26 @@ namespace ts.refactor { readonly ranges: readonly StatementRange[]; } - // Filters imports out of the range of statements to move. Imports will be copied to the new file anyway, and may still be needed in the old file. function getStatementsToMove(context: RefactorContext): ToMove | undefined { const rangeToMove = getRangeToMove(context); if (rangeToMove === undefined) return undefined; const all: Statement[] = []; const ranges: StatementRange[] = []; const { toMove, afterLast } = rangeToMove; - getRangesWhere(toMove, s => !isPureImport(s), (start, afterEndIndex) => { + getRangesWhere(toMove, isAllowedStatementToMove, (start, afterEndIndex) => { for (let i = start; i < afterEndIndex; i++) all.push(toMove[i]); ranges.push({ first: toMove[start], afterLast }); }); return all.length === 0 ? undefined : { all, ranges }; } + function isAllowedStatementToMove(statement: Statement): boolean { + // Filters imports and prologue directives out of the range of statements to move. + // Imports will be copied to the new file anyway, and may still be needed in the old file. + // Prologue directives will be copied to the new file and should be left in the old file. + return !isPureImport(statement) && !isPrologueDirective(statement);; + } + function isPureImport(node: Node): boolean { switch (node.kind) { case SyntaxKind.ImportDeclaration: @@ -109,12 +115,12 @@ namespace ts.refactor { function getNewStatementsAndRemoveFromOldFile( oldFile: SourceFile, usage: UsageInfo, changes: textChanges.ChangeTracker, toMove: ToMove, program: Program, newModuleName: string, preferences: UserPreferences, - ): readonly Statement[] { + ) { const checker = program.getTypeChecker(); - + const prologueDirectives = takeWhile(oldFile.statements, isPrologueDirective); if (!oldFile.externalModuleIndicator && !oldFile.commonJsModuleIndicator) { deleteMovedStatements(oldFile, toMove.ranges, changes); - return toMove.all; + return [...prologueDirectives, ...toMove.all]; } const useEs6ModuleSyntax = !!oldFile.externalModuleIndicator; @@ -126,12 +132,23 @@ namespace ts.refactor { deleteUnusedOldImports(oldFile, toMove.all, changes, usage.unusedImportsFromOldFile, checker); deleteMovedStatements(oldFile, toMove.ranges, changes); - updateImportsInOtherFiles(changes, program, oldFile, usage.movedSymbols, newModuleName); + const imports = getNewFileImportsAndAddExportInOldFile(oldFile, usage.oldImportsNeededByNewFile, usage.newFileImportsFromOldFile, changes, checker, useEs6ModuleSyntax, quotePreference); + const body = addExports(oldFile, toMove.all, usage.oldFileImportsFromNewFile, useEs6ModuleSyntax); + if (imports.length && body.length) { + return [ + ...prologueDirectives, + ...imports, + SyntaxKind.NewLineTrivia as const, + ...body + ]; + } + return [ - ...getNewFileImportsAndAddExportInOldFile(oldFile, usage.oldImportsNeededByNewFile, usage.newFileImportsFromOldFile, changes, checker, useEs6ModuleSyntax, quotePreference), - ...addExports(oldFile, toMove.all, usage.oldFileImportsFromNewFile, useEs6ModuleSyntax), + ...prologueDirectives, + ...imports, + ...body, ]; } diff --git a/src/services/rename.ts b/src/services/rename.ts index 4cdb4f14dc8..c3392a0ee64 100644 --- a/src/services/rename.ts +++ b/src/services/rename.ts @@ -13,7 +13,13 @@ namespace ts.Rename { function getRenameInfoForNode(node: Node, typeChecker: TypeChecker, sourceFile: SourceFile, isDefinedInLibraryFile: (declaration: Node) => boolean, options?: RenameInfoOptions): RenameInfo | undefined { const symbol = typeChecker.getSymbolAtLocation(node); - if (!symbol) return; + if (!symbol) { + if (isLabelName(node)) { + const name = getTextOfNode(node); + return getRenameInfoSuccess(name, name, ScriptElementKind.label, ScriptElementKindModifier.none, node, sourceFile); + } + return undefined; + } // Only allow a symbol to be renamed if it actually has at least one declaration. const { declarations } = symbol; if (!declarations || declarations.length === 0) return; diff --git a/src/services/services.ts b/src/services/services.ts index fa0f02a9b95..89292f09cf5 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -1171,7 +1171,7 @@ namespace ts { } } - const invalidOperationsOnSyntaxOnly: readonly (keyof LanguageService)[] = [ + const invalidOperationsInPartialSemanticMode: readonly (keyof LanguageService)[] = [ "getSyntacticDiagnostics", "getSemanticDiagnostics", "getSuggestionDiagnostics", @@ -1191,10 +1191,42 @@ namespace ts { "provideCallHierarchyOutgoingCalls", ]; + const invalidOperationsInSyntacticMode: readonly (keyof LanguageService)[] = [ + ...invalidOperationsInPartialSemanticMode, + "getCompletionsAtPosition", + "getCompletionEntryDetails", + "getCompletionEntrySymbol", + "getSignatureHelpItems", + "getQuickInfoAtPosition", + "getDefinitionAtPosition", + "getDefinitionAndBoundSpan", + "getImplementationAtPosition", + "getTypeDefinitionAtPosition", + "getReferencesAtPosition", + "findReferences", + "getOccurrencesAtPosition", + "getDocumentHighlights", + "getNavigateToItems", + "getRenameInfo", + "findRenameLocations", + "getApplicableRefactors", + ]; export function createLanguageService( host: LanguageServiceHost, documentRegistry: DocumentRegistry = createDocumentRegistry(host.useCaseSensitiveFileNames && host.useCaseSensitiveFileNames(), host.getCurrentDirectory()), - syntaxOnly = false): LanguageService { + syntaxOnlyOrLanguageServiceMode?: boolean | LanguageServiceMode, + ): LanguageService { + let languageServiceMode: LanguageServiceMode; + if (syntaxOnlyOrLanguageServiceMode === undefined) { + languageServiceMode = LanguageServiceMode.Semantic; + } + else if (typeof syntaxOnlyOrLanguageServiceMode === "boolean") { + // languageServiceMode = SyntaxOnly + languageServiceMode = syntaxOnlyOrLanguageServiceMode ? LanguageServiceMode.Syntactic : LanguageServiceMode.Semantic; + } + else { + languageServiceMode = syntaxOnlyOrLanguageServiceMode; + } const syntaxTreeCache: SyntaxTreeCache = new SyntaxTreeCache(host); let program: Program; @@ -1244,6 +1276,7 @@ namespace ts { } function synchronizeHostData(): void { + Debug.assert(languageServiceMode !== LanguageServiceMode.Syntactic); // perform fast check if host supports it if (host.getProjectVersion) { const hostProjectVersion = host.getProjectVersion(); @@ -1296,7 +1329,8 @@ namespace ts { getCurrentDirectory: () => currentDirectory, fileExists, readFile, - realpath: host.realpath && (path => host.realpath!(path)), + getSymlinkCache: maybeBind(host, host.getSymlinkCache), + realpath: maybeBind(host, host.realpath), directoryExists: directoryName => { return directoryProbablyExists(directoryName, host); }, @@ -1309,21 +1343,12 @@ namespace ts { }, onReleaseOldSourceFile, hasInvalidatedResolution, - hasChangedAutomaticTypeDirectiveNames + hasChangedAutomaticTypeDirectiveNames, + trace: maybeBind(host, host.trace), + resolveModuleNames: maybeBind(host, host.resolveModuleNames), + resolveTypeReferenceDirectives: maybeBind(host, host.resolveTypeReferenceDirectives), + useSourceOfProjectReferenceRedirect: maybeBind(host, host.useSourceOfProjectReferenceRedirect), }; - if (host.trace) { - compilerHost.trace = message => host.trace!(message); - } - - if (host.resolveModuleNames) { - compilerHost.resolveModuleNames = (...args) => host.resolveModuleNames!(...args); - } - if (host.resolveTypeReferenceDirectives) { - compilerHost.resolveTypeReferenceDirectives = (...args) => host.resolveTypeReferenceDirectives!(...args); - } - if (host.useSourceOfProjectReferenceRedirect) { - compilerHost.useSourceOfProjectReferenceRedirect = () => host.useSourceOfProjectReferenceRedirect!(); - } host.setCompilerHost?.(compilerHost); const documentRegistryBucketKey = documentRegistry.getKeyForCompilationSettings(newSettings); @@ -1436,6 +1461,11 @@ namespace ts { // TODO: GH#18217 frequently asserted as defined function getProgram(): Program | undefined { + if (languageServiceMode === LanguageServiceMode.Syntactic) { + Debug.assert(program === undefined); + return undefined; + } + synchronizeHostData(); return program; @@ -1797,22 +1827,37 @@ namespace ts { return kind === ScriptKind.TS || kind === ScriptKind.TSX; } - function getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[] { + function getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + function getSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[] { if (!isTsOrTsxFile(fileName)) { // do not run semantic classification on non-ts-or-tsx files return []; } synchronizeHostData(); - return ts.getSemanticClassifications(program.getTypeChecker(), cancellationToken, getValidSourceFile(fileName), program.getClassifiableNames(), span); + + const responseFormat = format || SemanticClassificationFormat.Original; + if (responseFormat === SemanticClassificationFormat.TwentyTwenty) { + return classifier.v2020.getSemanticClassifications(program, cancellationToken, getValidSourceFile(fileName), span); + } + else { + return ts.getSemanticClassifications(program.getTypeChecker(), cancellationToken, getValidSourceFile(fileName), program.getClassifiableNames(), span); + } } - function getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications { + function getEncodedSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): Classifications { if (!isTsOrTsxFile(fileName)) { // do not run semantic classification on non-ts-or-tsx files return { spans: [], endOfLineState: EndOfLineState.None }; } synchronizeHostData(); - return ts.getEncodedSemanticClassifications(program.getTypeChecker(), cancellationToken, getValidSourceFile(fileName), program.getClassifiableNames(), span); + + const responseFormat = format || SemanticClassificationFormat.Original; + if (responseFormat === SemanticClassificationFormat.Original) { + return ts.getEncodedSemanticClassifications(program.getTypeChecker(), cancellationToken, getValidSourceFile(fileName), program.getClassifiableNames(), span); + } + else { + return classifier.v2020.getEncodedSemanticClassifications(program, cancellationToken, getValidSourceFile(fileName), span); + } } function getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[] { @@ -2032,6 +2077,11 @@ namespace ts { // Push all text changes. for (let i = firstLine; i <= lastLine; i++) { + // If the range is multiline and ends on a beginning of a line, don't comment/uncomment. + if (firstLine !== lastLine && lineStarts[i] === textRange.end) { + continue; + } + const lineTextStart = lineTextStarts.get(i.toString()); // If the line is not an empty line; otherwise no-op. @@ -2511,14 +2561,26 @@ namespace ts { uncommentSelection, }; - if (syntaxOnly) { - invalidOperationsOnSyntaxOnly.forEach(key => - ls[key] = () => { - throw new Error(`LanguageService Operation: ${key} not allowed on syntaxServer`); - } - ); + switch (languageServiceMode) { + case LanguageServiceMode.Semantic: + break; + case LanguageServiceMode.PartialSemantic: + invalidOperationsInPartialSemanticMode.forEach(key => + ls[key] = () => { + throw new Error(`LanguageService Operation: ${key} not allowed in LanguageServiceMode.PartialSemantic`); + } + ); + break; + case LanguageServiceMode.Syntactic: + invalidOperationsInSyntacticMode.forEach(key => + ls[key] = () => { + throw new Error(`LanguageService Operation: ${key} not allowed in LanguageServiceMode.Syntactic`); + } + ); + break; + default: + Debug.assertNever(languageServiceMode); } - return ls; } diff --git a/src/services/shims.ts b/src/services/shims.ts index 8729ce6cc0b..14f6a61e747 100644 --- a/src/services/shims.ts +++ b/src/services/shims.ts @@ -145,9 +145,9 @@ namespace ts { getCompilerOptionsDiagnostics(): string; getSyntacticClassifications(fileName: string, start: number, length: number): string; - getSemanticClassifications(fileName: string, start: number, length: number): string; + getSemanticClassifications(fileName: string, start: number, length: number, format?: SemanticClassificationFormat): string; getEncodedSyntacticClassifications(fileName: string, start: number, length: number): string; - getEncodedSemanticClassifications(fileName: string, start: number, length: number): string; + getEncodedSemanticClassifications(fileName: string, start: number, length: number, format?: SemanticClassificationFormat): string; getCompletionsAtPosition(fileName: string, position: number, preferences: UserPreferences | undefined): string; getCompletionEntryDetails(fileName: string, position: number, entryName: string, formatOptions: string/*Services.FormatCodeOptions*/ | undefined, source: string | undefined, preferences: UserPreferences | undefined): string; diff --git a/src/services/signatureHelp.ts b/src/services/signatureHelp.ts index 954cd1da9e1..c8b333d0356 100644 --- a/src/services/signatureHelp.ts +++ b/src/services/signatureHelp.ts @@ -304,14 +304,17 @@ namespace ts.SignatureHelp { if (!info) return undefined; const { contextualType, argumentIndex, argumentCount, argumentsSpan } = info; - const signatures = contextualType.getCallSignatures(); + // for optional function condition. + const nonNullableContextualType = contextualType.getNonNullableType(); + + const signatures = nonNullableContextualType.getCallSignatures(); if (signatures.length !== 1) return undefined; - const invocation: ContextualInvocation = { kind: InvocationKind.Contextual, signature: first(signatures), node: startingToken, symbol: chooseBetterSymbol(contextualType.symbol) }; + const invocation: ContextualInvocation = { kind: InvocationKind.Contextual, signature: first(signatures), node: startingToken, symbol: chooseBetterSymbol(nonNullableContextualType.symbol) }; return { isTypeParameterList: false, invocation, argumentsSpan, argumentIndex, argumentCount }; } - interface ContextualSignatureLocationInfo {readonly contextualType: Type; readonly argumentIndex: number; readonly argumentCount: number; readonly argumentsSpan: TextSpan; } + interface ContextualSignatureLocationInfo { readonly contextualType: Type; readonly argumentIndex: number; readonly argumentCount: number; readonly argumentsSpan: TextSpan; } function getContextualSignatureLocationInfo(startingToken: Node, sourceFile: SourceFile, checker: TypeChecker): ContextualSignatureLocationInfo | undefined { if (startingToken.kind !== SyntaxKind.OpenParenToken && startingToken.kind !== SyntaxKind.CommaToken) return undefined; const { parent } = startingToken; diff --git a/src/services/smartSelection.ts b/src/services/smartSelection.ts index 3263e7ed4fd..3fcab166959 100644 --- a/src/services/smartSelection.ts +++ b/src/services/smartSelection.ts @@ -13,7 +13,7 @@ namespace ts.SmartSelectionRange { const prevNode: Node | undefined = children[i - 1]; const node: Node = children[i]; const nextNode: Node | undefined = children[i + 1]; - if (node.getStart(sourceFile) > pos) { + if (getTokenPosOfNode(node, sourceFile, /*includeJsDoc*/ true) > pos) { break outer; } @@ -23,14 +23,14 @@ namespace ts.SmartSelectionRange { // of things that should be considered independently. // 3. A VariableStatement’s children are just a VaraiableDeclarationList and a semicolon. // 4. A lone VariableDeclaration in a VaraibleDeclaration feels redundant with the VariableStatement. - // // Dive in without pushing a selection range. if (isBlock(node) || isTemplateSpan(node) || isTemplateHead(node) || isTemplateTail(node) || prevNode && isTemplateHead(prevNode) || isVariableDeclarationList(node) && isVariableStatement(parentNode) || isSyntaxList(node) && isVariableDeclarationList(parentNode) - || isVariableDeclaration(node) && isSyntaxList(parentNode) && children.length === 1) { + || isVariableDeclaration(node) && isSyntaxList(parentNode) && children.length === 1 + || isJSDocTypeExpression(node) || isJSDocSignature(node) || isJSDocTypeLiteral(node)) { parentNode = node; break; } @@ -44,16 +44,15 @@ namespace ts.SmartSelectionRange { // Blocks with braces, brackets, parens, or JSX tags on separate lines should be // selected from open to close, including whitespace but not including the braces/etc. themselves. - const isBetweenMultiLineBookends = isSyntaxList(node) - && isListOpener(prevNode) - && isListCloser(nextNode) + const isBetweenMultiLineBookends = isSyntaxList(node) && isListOpener(prevNode) && isListCloser(nextNode) && !positionsAreOnSameLine(prevNode.getStart(), nextNode.getStart(), sourceFile); - const jsDocCommentStart = hasJSDocNodes(node) && node.jsDoc![0].getStart(); const start = isBetweenMultiLineBookends ? prevNode.getEnd() : node.getStart(); - const end = isBetweenMultiLineBookends ? nextNode.getStart() : node.getEnd(); - if (isNumber(jsDocCommentStart)) { - pushSelectionRange(jsDocCommentStart, end); + const end = isBetweenMultiLineBookends ? nextNode.getStart() : getEndPos(sourceFile, node); + + if (hasJSDocNodes(node) && node.jsDoc?.length) { + pushSelectionRange(first(node.jsDoc).getStart(), end); } + pushSelectionRange(start, end); // String literals should have a stop both inside and outside their quotes. @@ -270,4 +269,17 @@ namespace ts.SmartSelectionRange { || kind === SyntaxKind.CloseParenToken || kind === SyntaxKind.JsxClosingElement; } + + function getEndPos(sourceFile: SourceFile, node: Node): number { + switch (node.kind) { + case SyntaxKind.JSDocParameterTag: + case SyntaxKind.JSDocCallbackTag: + case SyntaxKind.JSDocPropertyTag: + case SyntaxKind.JSDocTypedefTag: + case SyntaxKind.JSDocThisTag: + return sourceFile.getLineEndOfPosition(node.getStart()); + default: + return node.getEnd(); + } + } } diff --git a/src/services/stringCompletions.ts b/src/services/stringCompletions.ts index c3473b6251e..c9d57642ec1 100644 --- a/src/services/stringCompletions.ts +++ b/src/services/stringCompletions.ts @@ -12,10 +12,12 @@ namespace ts.Completions.StringCompletions { } } - function convertStringLiteralCompletions(completion: StringLiteralCompletion | undefined, contextToken: Node, sourceFile: SourceFile, checker: TypeChecker, log: Log, preferences: UserPreferences): CompletionInfo | undefined { + function convertStringLiteralCompletions(completion: StringLiteralCompletion | undefined, contextToken: StringLiteralLike, sourceFile: SourceFile, checker: TypeChecker, log: Log, preferences: UserPreferences): CompletionInfo | undefined { if (completion === undefined) { return undefined; } + + const optionalReplacementSpan = createTextSpanFromStringLiteralLikeContent(contextToken); switch (completion.kind) { case StringLiteralCompletionKind.Paths: return convertPathCompletions(completion.paths); @@ -33,17 +35,17 @@ namespace ts.Completions.StringCompletions { CompletionKind.String, preferences ); // Target will not be used, so arbitrary - return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: completion.hasIndexSignature, entries }; + return { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: completion.hasIndexSignature, optionalReplacementSpan, entries }; } case StringLiteralCompletionKind.Types: { const entries = completion.types.map(type => ({ name: type.value, kindModifiers: ScriptElementKindModifier.none, kind: ScriptElementKind.string, - sortText: "0", + sortText: SortText.LocationPriority, replacementSpan: getReplacementSpanForContextToken(contextToken) })); - return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: completion.isNewIdentifier, entries }; + return { isGlobalCompletion: false, isMemberCompletion: false, isNewIdentifierLocation: completion.isNewIdentifier, optionalReplacementSpan, entries }; } default: return Debug.assertNever(completion); @@ -108,12 +110,19 @@ namespace ts.Completions.StringCompletions { } type StringLiteralCompletion = { readonly kind: StringLiteralCompletionKind.Paths, readonly paths: readonly PathCompletion[] } | StringLiteralCompletionsFromProperties | StringLiteralCompletionsFromTypes; function getStringLiteralCompletionEntries(sourceFile: SourceFile, node: StringLiteralLike, position: number, typeChecker: TypeChecker, compilerOptions: CompilerOptions, host: LanguageServiceHost): StringLiteralCompletion | undefined { - const { parent } = node; + const parent = walkUpParentheses(node.parent); switch (parent.kind) { - case SyntaxKind.LiteralType: - switch (parent.parent.kind) { - case SyntaxKind.TypeReference: - return { kind: StringLiteralCompletionKind.Types, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(parent as LiteralTypeNode)), isNewIdentifier: false }; + case SyntaxKind.LiteralType: { + const grandParent = walkUpParentheses(parent.parent); + switch (grandParent.kind) { + case SyntaxKind.TypeReference: { + const typeReference = grandParent as TypeReferenceNode; + const typeArgument = findAncestor(parent, n => n.parent === typeReference) as LiteralTypeNode; + if (typeArgument) { + return { kind: StringLiteralCompletionKind.Types, types: getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(typeArgument)), isNewIdentifier: false }; + } + return undefined; + } case SyntaxKind.IndexedAccessType: // Get all apparent property names // i.e. interface Foo { @@ -121,19 +130,25 @@ namespace ts.Completions.StringCompletions { // bar: string; // } // let x: Foo["/*completion position*/"] - return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode((parent.parent as IndexedAccessTypeNode).objectType)); + const { indexType, objectType } = grandParent as IndexedAccessTypeNode; + if (!rangeContainsPosition(indexType, position)) { + return undefined; + } + return stringLiteralCompletionsFromProperties(typeChecker.getTypeFromTypeNode(objectType)); case SyntaxKind.ImportType: return { kind: StringLiteralCompletionKind.Paths, paths: getStringLiteralCompletionsFromModuleNames(sourceFile, node, compilerOptions, host, typeChecker) }; case SyntaxKind.UnionType: { - if (!isTypeReferenceNode(parent.parent.parent)) return undefined; - const alreadyUsedTypes = getAlreadyUsedTypesInStringLiteralUnion(parent.parent as UnionTypeNode, parent as LiteralTypeNode); - const types = getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(parent.parent as UnionTypeNode)).filter(t => !contains(alreadyUsedTypes, t.value)); + if (!isTypeReferenceNode(grandParent.parent)) { + return undefined; + } + const alreadyUsedTypes = getAlreadyUsedTypesInStringLiteralUnion(grandParent as UnionTypeNode, parent as LiteralTypeNode); + const types = getStringLiteralTypes(typeChecker.getTypeArgumentConstraint(grandParent as UnionTypeNode)).filter(t => !contains(alreadyUsedTypes, t.value)); return { kind: StringLiteralCompletionKind.Types, types, isNewIdentifier: false }; } default: return undefined; } - + } case SyntaxKind.PropertyAssignment: if (isObjectLiteralExpression(parent.parent) && (parent).name === node) { // Get quoted name of properties of the object literal expression @@ -154,7 +169,7 @@ namespace ts.Completions.StringCompletions { case SyntaxKind.ElementAccessExpression: { const { expression, argumentExpression } = parent as ElementAccessExpression; - if (node === argumentExpression) { + if (node === skipParentheses(argumentExpression)) { // Get all names of properties on the expression // i.e. interface A { // 'prop1': string @@ -199,6 +214,17 @@ namespace ts.Completions.StringCompletions { } } + function walkUpParentheses(node: Node) { + switch (node.kind) { + case SyntaxKind.ParenthesizedType: + return walkUpParenthesizedTypes(node); + case SyntaxKind.ParenthesizedExpression: + return walkUpParenthesizedExpressions(node); + default: + return node; + } + } + function getAlreadyUsedTypesInStringLiteralUnion(union: UnionTypeNode, current: LiteralTypeNode): readonly string[] { return mapDefined(union.types, type => type !== current && isLiteralTypeNode(type) && isStringLiteral(type.literal) ? type.literal.text : undefined); diff --git a/src/services/suggestionDiagnostics.ts b/src/services/suggestionDiagnostics.ts index a8c50322522..8d557d4edcb 100644 --- a/src/services/suggestionDiagnostics.ts +++ b/src/services/suggestionDiagnostics.ts @@ -37,7 +37,7 @@ namespace ts { function check(node: Node) { if (isJsFile) { - if (canBeConvertedToClass(node)) { + if (canBeConvertedToClass(node, checker)) { diags.push(createDiagnosticForNode(isVariableDeclaration(node.parent) ? node.parent.name : node, Diagnostics.This_constructor_function_may_be_converted_to_a_class_declaration)); } } @@ -190,14 +190,13 @@ namespace ts { return `${exp.pos.toString()}:${exp.end.toString()}`; } - function canBeConvertedToClass(node: Node): boolean { + function canBeConvertedToClass(node: Node, checker: TypeChecker): boolean { if (node.kind === SyntaxKind.FunctionExpression) { if (isVariableDeclaration(node.parent) && node.symbol.members?.size) { return true; } - const decl = getDeclarationOfExpando(node); - const symbol = decl?.symbol; + const symbol = checker.getSymbolOfExpando(node, /*allowDeclaration*/ false); return !!(symbol && (symbol.exports?.size || symbol.members?.size)); } diff --git a/src/services/textChanges.ts b/src/services/textChanges.ts index 0448be77e99..c1ef8e82b08 100644 --- a/src/services/textChanges.ts +++ b/src/services/textChanges.ts @@ -56,6 +56,8 @@ namespace ts.textChanges { export enum TrailingTriviaOption { /** Exclude all trailing trivia (use getEnd()) */ Exclude, + /** Doesn't include whitespace, but does strip comments */ + ExcludeWhitespace, /** Include trailing trivia */ Include, } @@ -209,10 +211,19 @@ namespace ts.textChanges { function getAdjustedEndPosition(sourceFile: SourceFile, node: Node, options: ConfigurableEnd) { const { end } = node; const { trailingTriviaOption } = options; - if (trailingTriviaOption === TrailingTriviaOption.Exclude || (isExpression(node) && trailingTriviaOption !== TrailingTriviaOption.Include)) { + if (trailingTriviaOption === TrailingTriviaOption.Exclude) { + return end; + } + if (trailingTriviaOption === TrailingTriviaOption.ExcludeWhitespace) { + const comments = concatenate(getTrailingCommentRanges(sourceFile.text, end), getLeadingCommentRanges(sourceFile.text, end)); + const realEnd = comments?.[comments.length - 1]?.end; + if (realEnd) { + return realEnd; + } return end; } const newEnd = skipTrivia(sourceFile.text, end, /*stopAfterLineBreak*/ true); + return newEnd !== end && (trailingTriviaOption === TrailingTriviaOption.Include || isLineBreak(sourceFile.text.charCodeAt(newEnd - 1))) ? newEnd : end; @@ -249,7 +260,7 @@ namespace ts.textChanges { export class ChangeTracker { private readonly changes: Change[] = []; - private readonly newFiles: { readonly oldFile: SourceFile | undefined, readonly fileName: string, readonly statements: readonly Statement[] }[] = []; + private readonly newFiles: { readonly oldFile: SourceFile | undefined, readonly fileName: string, readonly statements: readonly (Statement | SyntaxKind.NewLineTrivia)[] }[] = []; private readonly classesWithNodesInsertedAtStart = new Map(); // Set implemented as Map private readonly deletedNodes: { readonly sourceFile: SourceFile, readonly node: Node | NodeArray }[] = []; @@ -384,8 +395,8 @@ namespace ts.textChanges { } } - public insertNodeBefore(sourceFile: SourceFile, before: Node, newNode: Node, blankLineBetween = false): void { - this.insertNodeAt(sourceFile, getAdjustedStartPosition(sourceFile, before, {}), newNode, this.getOptionsForInsertNodeBefore(before, newNode, blankLineBetween)); + public insertNodeBefore(sourceFile: SourceFile, before: Node, newNode: Node, blankLineBetween = false, options: ConfigurableStartEnd = {}): void { + this.insertNodeAt(sourceFile, getAdjustedStartPosition(sourceFile, before, options), newNode, this.getOptionsForInsertNodeBefore(before, newNode, blankLineBetween)); } public insertModifierBefore(sourceFile: SourceFile, modifier: SyntaxKind, before: Node): void { @@ -469,7 +480,7 @@ namespace ts.textChanges { public insertTypeParameters(sourceFile: SourceFile, node: SignatureDeclaration, typeParameters: readonly TypeParameterDeclaration[]): void { // If no `(`, is an arrow function `x => x`, so use the pos of the first parameter const start = (findChildOfKind(node, SyntaxKind.OpenParenToken, sourceFile) || first(node.parameters)).getStart(sourceFile); - this.insertNodesAt(sourceFile, start, typeParameters, { prefix: "<", suffix: ">" }); + this.insertNodesAt(sourceFile, start, typeParameters, { prefix: "<", suffix: ">", joiner: ", " }); } private getOptionsForInsertNodeBefore(before: Node, inserted: Node, blankLineBetween: boolean): InsertNodeOptions { @@ -794,7 +805,8 @@ namespace ts.textChanges { const indentation = formatting.SmartIndenter.findFirstNonWhitespaceColumn(afterStartLinePosition, afterStart, sourceFile, this.formatContext.options); // insert element before the line break on the line that contains 'after' element let insertPos = skipTrivia(sourceFile.text, end, /*stopAfterLineBreak*/ true, /*stopAtComments*/ false); - if (insertPos !== end && isLineBreak(sourceFile.text.charCodeAt(insertPos - 1))) { + // find position before "\n" or "\r\n" + while (insertPos !== end && isLineBreak(sourceFile.text.charCodeAt(insertPos - 1))) { insertPos--; } this.replaceRange(sourceFile, createRange(insertPos), newNode, { indentation, prefix: this.newLineCharacter }); @@ -867,7 +879,7 @@ namespace ts.textChanges { return changes; } - public createNewFile(oldFile: SourceFile | undefined, fileName: string, statements: readonly Statement[]): void { + public createNewFile(oldFile: SourceFile | undefined, fileName: string, statements: readonly (Statement | SyntaxKind.NewLineTrivia)[]): void { this.newFiles.push({ oldFile, fileName, statements }); } } @@ -921,14 +933,14 @@ namespace ts.textChanges { }); } - export function newFileChanges(oldFile: SourceFile | undefined, fileName: string, statements: readonly Statement[], newLineCharacter: string, formatContext: formatting.FormatContext): FileTextChanges { + export function newFileChanges(oldFile: SourceFile | undefined, fileName: string, statements: readonly (Statement | SyntaxKind.NewLineTrivia)[], newLineCharacter: string, formatContext: formatting.FormatContext): FileTextChanges { const text = newFileChangesWorker(oldFile, getScriptKindFromFileName(fileName), statements, newLineCharacter, formatContext); return { fileName, textChanges: [createTextChange(createTextSpan(0, 0), text)], isNewFile: true }; } - export function newFileChangesWorker(oldFile: SourceFile | undefined, scriptKind: ScriptKind, statements: readonly Statement[], newLineCharacter: string, formatContext: formatting.FormatContext): string { + export function newFileChangesWorker(oldFile: SourceFile | undefined, scriptKind: ScriptKind, statements: readonly (Statement | SyntaxKind.NewLineTrivia)[], newLineCharacter: string, formatContext: formatting.FormatContext): string { // TODO: this emits the file, parses it back, then formats it that -- may be a less roundabout way to do this - const nonFormattedText = statements.map(s => getNonformattedText(s, oldFile, newLineCharacter).text).join(newLineCharacter); + const nonFormattedText = statements.map(s => s === SyntaxKind.NewLineTrivia ? "" : getNonformattedText(s, oldFile, newLineCharacter).text).join(newLineCharacter); const sourceFile = createSourceFile("any file name", nonFormattedText, ScriptTarget.ESNext, /*setParentNodes*/ true, scriptKind); const changes = formatting.formatDocument(sourceFile, formatContext); return applyChanges(nonFormattedText, changes) + newLineCharacter; @@ -985,7 +997,12 @@ namespace ts.textChanges { export function getNonformattedText(node: Node, sourceFile: SourceFile | undefined, newLineCharacter: string): { text: string, node: Node } { const writer = createWriter(newLineCharacter); const newLine = newLineCharacter === "\n" ? NewLineKind.LineFeed : NewLineKind.CarriageReturnLineFeed; - createPrinter({ newLine, neverAsciiEscape: true, preserveSourceNewlines: true }, writer).writeNode(EmitHint.Unspecified, node, sourceFile, writer); + createPrinter({ + newLine, + neverAsciiEscape: true, + preserveSourceNewlines: true, + terminateUnterminatedLiterals: true + }, writer).writeNode(EmitHint.Unspecified, node, sourceFile, writer); return { text: writer.getText(), node: assignPositionsToNode(node) }; } } diff --git a/src/services/tsconfig.json b/src/services/tsconfig.json index e1aab52f187..dcd1020f284 100644 --- a/src/services/tsconfig.json +++ b/src/services/tsconfig.json @@ -12,6 +12,7 @@ "types.ts", "utilities.ts", "classifier.ts", + "classifier2020.ts", "stringCompletions.ts", "completions.ts", "documentHighlights.ts", @@ -61,6 +62,7 @@ "codefixes/correctQualifiedNameToIndexedAccessType.ts", "codefixes/convertToTypeOnlyExport.ts", "codefixes/convertToTypeOnlyImport.ts", + "codefixes/convertLiteralTypeToMappedType.ts", "codefixes/fixClassIncorrectlyImplementsInterface.ts", "codefixes/importFixes.ts", "codefixes/fixImplicitThis.ts", @@ -105,8 +107,10 @@ "codefixes/splitTypeOnlyImport.ts", "codefixes/convertConstToLet.ts", "codefixes/fixExpectedComma.ts", + "codefixes/fixAddVoidToPromise.ts", "refactors/convertExport.ts", "refactors/convertImport.ts", + "refactors/convertToOptionalChainExpression.ts", "refactors/convertOverloadListToSingleSignature.ts", "refactors/extractSymbol.ts", "refactors/extractType.ts", diff --git a/src/services/types.ts b/src/services/types.ts index 73080249abd..7fb1166eb19 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -211,9 +211,9 @@ namespace ts { /* @internal */ export const enum PackageJsonAutoImportPreference { - None, - ExcludeDevDependencies, - All + Off, + On, + Auto, } export interface PerformanceEvent { @@ -221,6 +221,12 @@ namespace ts { durationMs: number; } + export enum LanguageServiceMode { + Semantic, + PartialSemantic, + Syntactic, + } + // // Public interface of the host of a language service instance. // @@ -271,7 +277,7 @@ namespace ts { /* @internal */ getGlobalTypingsCacheLocation?(): string | undefined; /* @internal */ - getProbableSymlinks?(files: readonly SourceFile[]): ReadonlyESMap; + getSymlinkCache?(files?: readonly SourceFile[]): SymlinkCache; /* * Required for full import and type reference completions. @@ -313,6 +319,11 @@ namespace ts { export type WithMetadata = T & { metadata?: unknown; }; + export const enum SemanticClassificationFormat { + Original = "original", + TwentyTwenty = "2020" + } + // // Public services of a language service instance associated // with a language service host instance @@ -376,13 +387,25 @@ namespace ts { /** @deprecated Use getEncodedSyntacticClassifications instead. */ getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getSyntacticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; /** @deprecated Use getEncodedSemanticClassifications instead. */ getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getSemanticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; - // Encoded as triples of [start, length, ClassificationType]. + /** Encoded as triples of [start, length, ClassificationType]. */ getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications; - getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications; + + /** + * Gets semantic highlights information for a particular file. Has two formats, an older + * version used by VS and a format used by VS Code. + * + * @param fileName The path to the file + * @param position A text span to return results within + * @param format Which format to use, defaults to "original" + * @returns a number array encoded as triples of [start, length, ClassificationType, ...]. + */ + getEncodedSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): Classifications; /** * Gets completion entries at a particular position in a file. @@ -597,6 +620,11 @@ namespace ts { classificationType: ClassificationTypeNames; } + export interface ClassifiedSpan2020 { + textSpan: TextSpan; + classificationType: number; + } + /** * Navigation bar interface designed for visual studio's dual-column layout. * This does not form a proper tree. @@ -1081,6 +1109,12 @@ namespace ts { /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */ isGlobalCompletion: boolean; isMemberCompletion: boolean; + /** + * In the absence of `CompletionEntry["replacementSpan"], the editor may choose whether to use + * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span + * must be used to commit that completion entry. + */ + optionalReplacementSpan?: TextSpan; /** * true when the current location also allows for a new identifier diff --git a/src/services/utilities.ts b/src/services/utilities.ts index 4c841278f42..8a85a3af759 100644 --- a/src/services/utilities.ts +++ b/src/services/utilities.ts @@ -105,6 +105,9 @@ namespace ts { else if (isDeclarationName(node)) { return getMeaningFromDeclaration(node.parent); } + else if (isEntityName(node) && isJSDocNameReference(node.parent)) { + return SemanticMeaning.All; + } else if (isTypeReference(node)) { return SemanticMeaning.Type; } @@ -1217,6 +1220,10 @@ namespace ts { } const children = n.getChildren(sourceFile); + if (children.length === 0) { + return n; + } + const candidate = findRightmostChildNodeWithTokens(children, /*exclusiveStartPosition*/ children.length, sourceFile); return candidate && findRightmostToken(candidate, sourceFile); } @@ -1760,12 +1767,13 @@ namespace ts { getCurrentDirectory: () => host.getCurrentDirectory(), readFile: maybeBind(host, host.readFile), useCaseSensitiveFileNames: maybeBind(host, host.useCaseSensitiveFileNames), - getProbableSymlinks: maybeBind(host, host.getProbableSymlinks) || (() => program.getProbableSymlinks()), + getSymlinkCache: maybeBind(host, host.getSymlinkCache) || program.getSymlinkCache, getGlobalTypingsCacheLocation: maybeBind(host, host.getGlobalTypingsCacheLocation), getSourceFiles: () => program.getSourceFiles(), redirectTargetsMap: program.redirectTargetsMap, getProjectReferenceRedirect: fileName => program.getProjectReferenceRedirect(fileName), isSourceOfProjectReferenceRedirect: fileName => program.isSourceOfProjectReferenceRedirect(fileName), + getCompilerOptions: () => program.getCompilerOptions() }; } @@ -1913,7 +1921,10 @@ namespace ts { for (const newImport of sortedNewImports) { const insertionIndex = OrganizeImports.getImportDeclarationInsertionIndex(existingImportStatements, newImport); if (insertionIndex === 0) { - changes.insertNodeBefore(sourceFile, existingImportStatements[0], newImport, /*blankLineBetween*/ false); + // If the first import is top-of-file, insert after the leading comment which is likely the header. + const options = existingImportStatements[0] === sourceFile.statements[0] ? + { leadingTriviaOption: textChanges.LeadingTriviaOption.Exclude } : {}; + changes.insertNodeBefore(sourceFile, existingImportStatements[0], newImport, /*blankLineBetween*/ false, options); } else { const prevImport = existingImportStatements[insertionIndex - 1]; @@ -2517,7 +2528,7 @@ namespace ts { const checker = program.getTypeChecker(); let typeIsAccessible = true; const notAccessible = () => { typeIsAccessible = false; }; - const res = checker.typeToTypeNode(type, enclosingScope, /*flags*/ undefined, { + const res = checker.typeToTypeNode(type, enclosingScope, NodeBuilderFlags.NoTruncation, { trackSymbol: (symbol, declaration, meaning) => { typeIsAccessible = typeIsAccessible && checker.isSymbolAccessible(symbol, declaration, meaning, /*shouldComputeAliasToMarkVisible*/ false).accessibility === SymbolAccessibility.Accessible; }, @@ -2735,9 +2746,7 @@ namespace ts { type PackageJsonRaw = Record | undefined>; const dependencyKeys = ["dependencies", "devDependencies", "optionalDependencies", "peerDependencies"] as const; - const stringContent = host.readFile(fileName); - if (!stringContent) return undefined; - + const stringContent = host.readFile(fileName) || ""; const content = tryParseJson(stringContent) as PackageJsonRaw | undefined; const info: Pick = {}; if (content) { @@ -2867,11 +2876,23 @@ namespace ts { if (symbol.escapedName === InternalSymbolName.ExportEquals || symbol.escapedName === InternalSymbolName.Default) { // Name of "export default foo;" is "foo". Name of "export default 0" is the filename converted to camelCase. return firstDefined(symbol.declarations, d => isExportAssignment(d) && isIdentifier(d.expression) ? d.expression.text : undefined) - || codefix.moduleSymbolToValidIdentifier(Debug.checkDefined(symbol.parent), scriptTarget); + || codefix.moduleSymbolToValidIdentifier(getSymbolParentOrFail(symbol), scriptTarget); } return symbol.name; } + function getSymbolParentOrFail(symbol: Symbol) { + return Debug.checkDefined( + symbol.parent, + `Symbol parent was undefined. Flags: ${Debug.formatSymbolFlags(symbol.flags)}. ` + + `Declarations: ${symbol.declarations?.map(d => { + const kind = Debug.formatSyntaxKind(d.kind); + const inJS = isInJSFile(d); + const { expression } = d as any; + return (inJS ? "[JS]" : "") + kind + (expression ? ` (expression: ${Debug.formatSyntaxKind(expression.kind)})` : ""); + }).join(", ")}.`); + } + /** * Useful to check whether a string contains another string at a specific index * without allocating another string or traversing the entire contents of the outer string. diff --git a/src/testRunner/tsconfig.json b/src/testRunner/tsconfig.json index 00764792e70..7ed0718f67f 100644 --- a/src/testRunner/tsconfig.json +++ b/src/testRunner/tsconfig.json @@ -2,6 +2,7 @@ "extends": "../tsconfig-noncomposite-base", "compilerOptions": { "outFile": "../../built/local/run.js", + "moduleResolution": "node", "composite": false, "declaration": false, "declarationMap": false, @@ -110,6 +111,7 @@ "unittests/tsbuild/amdModulesWithOut.ts", "unittests/tsbuild/configFileErrors.ts", "unittests/tsbuild/containerOnlyReferenced.ts", + "unittests/tsbuild/declarationEmit.ts", "unittests/tsbuild/demo.ts", "unittests/tsbuild/emitDeclarationOnly.ts", "unittests/tsbuild/emptyFiles.ts", @@ -175,6 +177,7 @@ "unittests/tsserver/occurences.ts", "unittests/tsserver/openFile.ts", "unittests/tsserver/packageJsonInfo.ts", + "unittests/tsserver/partialSemanticServer.ts", "unittests/tsserver/projectErrors.ts", "unittests/tsserver/projectReferenceCompileOnSave.ts", "unittests/tsserver/projectReferenceErrors.ts", @@ -184,11 +187,11 @@ "unittests/tsserver/reload.ts", "unittests/tsserver/rename.ts", "unittests/tsserver/resolutionCache.ts", - "unittests/tsserver/semanticOperationsOnSyntaxServer.ts", - "unittests/tsserver/smartSelection.ts", "unittests/tsserver/session.ts", "unittests/tsserver/skipLibCheck.ts", + "unittests/tsserver/smartSelection.ts", "unittests/tsserver/symLinks.ts", + "unittests/tsserver/syntacticServer.ts", "unittests/tsserver/syntaxOperations.ts", "unittests/tsserver/textStorage.ts", "unittests/tsserver/telemetry.ts", diff --git a/src/testRunner/unittests/config/commandLineParsing.ts b/src/testRunner/unittests/config/commandLineParsing.ts index 4c1331ca430..9fc9b0735b5 100644 --- a/src/testRunner/unittests/config/commandLineParsing.ts +++ b/src/testRunner/unittests/config/commandLineParsing.ts @@ -14,7 +14,14 @@ namespace ts { const expectedError = expectedErrors[i]; assert.equal(parsedError.code, expectedError.code); assert.equal(parsedError.category, expectedError.category); - assert.equal(parsedError.messageText, expectedError.messageText); + // Allow matching a prefix of the error message + if (typeof expectedError.messageText === "string" && expectedError.messageText.includes("[...]")) { + const prefix = expectedError.messageText.split("[...]")[0]; + assert(expectedError.messageText.startsWith(prefix)); + } + else { + assert.equal(parsedError.messageText, expectedError.messageText); + } } const parsedFileNames = parsed.fileNames; @@ -83,7 +90,7 @@ namespace ts { assertParseResult(["--lib", "es5,invalidOption", "0.ts"], { errors: [{ - messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2020.bigint', 'es2020.promise', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'esnext.array', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise'.", + messageText: "Argument for '--lib' option must be: 'es5', 'es6' [...]", category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, file: undefined, @@ -109,7 +116,7 @@ namespace ts { start: undefined, length: undefined, }, { - messageText: "Argument for '--jsx' option must be: 'preserve', 'react-native', 'react'.", + messageText: "Argument for '--jsx' option must be: 'preserve', 'react-native', 'react', 'react-jsx', 'react-jsxdev'.", category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, @@ -285,7 +292,7 @@ namespace ts { assertParseResult(["--lib", "es5,", "es7", "0.ts"], { errors: [{ - messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2020.bigint', 'es2020.promise', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'esnext.array', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise'.", + messageText: "Argument for '--lib' option must be: 'es5', 'es6' [...].", category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, file: undefined, @@ -304,7 +311,7 @@ namespace ts { assertParseResult(["--lib", "es5, ", "es7", "0.ts"], { errors: [{ - messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'es2018', 'es2019', 'es2020', 'esnext', 'dom', 'dom.iterable', 'webworker', 'webworker.importscripts', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'es2017.intl', 'es2017.typedarrays', 'es2018.asyncgenerator', 'es2018.asynciterable', 'es2018.intl', 'es2018.promise', 'es2018.regexp', 'es2019.array', 'es2019.object', 'es2019.string', 'es2019.symbol', 'es2020.bigint', 'es2020.promise', 'es2020.string', 'es2020.symbol.wellknown', 'es2020.intl', 'esnext.array', 'esnext.symbol', 'esnext.asynciterable', 'esnext.intl', 'esnext.bigint', 'esnext.string', 'esnext.promise'.", + messageText: "Argument for '--lib' option must be: 'es5', 'es6', [...]", category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, file: undefined, diff --git a/src/testRunner/unittests/config/tsconfigParsing.ts b/src/testRunner/unittests/config/tsconfigParsing.ts index 5e15bbc6e9f..3c6dfb6a536 100644 --- a/src/testRunner/unittests/config/tsconfigParsing.ts +++ b/src/testRunner/unittests/config/tsconfigParsing.ts @@ -381,5 +381,36 @@ namespace ts { const parsed = getParsedCommandJsonNode(jsonText, "/apath/tsconfig.json", "tests/cases/unittests", ["/apath/a.ts"]); assert.isTrue(parsed.errors.length >= 0); }); + + it("generates errors when files is not string", () => { + assertParseFileDiagnostics( + JSON.stringify({ + files: [{ + compilerOptions: { + experimentalDecorators: true, + allowJs: true + } + }] + }), + "/apath/tsconfig.json", + "tests/cases/unittests", + ["/apath/a.ts"], + Diagnostics.Compiler_option_0_requires_a_value_of_type_1.code, + /*noLocation*/ true); + }); + + it("generates errors when include is not string", () => { + assertParseFileDiagnostics( + JSON.stringify({ + include: [ + ["./**/*.ts"] + ] + }), + "/apath/tsconfig.json", + "tests/cases/unittests", + ["/apath/a.ts"], + Diagnostics.Compiler_option_0_requires_a_value_of_type_1.code, + /*noLocation*/ true); + }); }); } diff --git a/src/testRunner/unittests/jsDocParsing.ts b/src/testRunner/unittests/jsDocParsing.ts index ace9f0af996..87840865067 100644 --- a/src/testRunner/unittests/jsDocParsing.ts +++ b/src/testRunner/unittests/jsDocParsing.ts @@ -314,7 +314,6 @@ namespace ts { `/** * {@link first link} * Inside {@link link text} thing - * @see {@link second link text} and {@link Foo|a foo} as well. */`); parsesCorrectly("authorTag", `/** diff --git a/src/testRunner/unittests/programApi.ts b/src/testRunner/unittests/programApi.ts index 63c33deb595..f78d7e9b39e 100644 --- a/src/testRunner/unittests/programApi.ts +++ b/src/testRunner/unittests/programApi.ts @@ -204,4 +204,20 @@ namespace ts { assert.isEmpty(program.getSemanticDiagnostics()); }); }); + + describe("unittests:: programApi:: CompilerOptions relative paths", () => { + it("resolves relative paths by getCurrentDirectory", () => { + const main = new documents.TextDocument("/main.ts", "import \"module\";"); + const mod = new documents.TextDocument("/lib/module.ts", "declare const foo: any;"); + + const fs = vfs.createFromFileSystem(Harness.IO, /*ignoreCase*/ false, { documents: [main, mod], cwd: "/" }); + const program = createProgram(["./main.ts"], { + paths: { "*": ["./lib/*"] } + }, new fakes.CompilerHost(fs, { newLine: NewLineKind.LineFeed })); + + assert.isEmpty(program.getConfigFileParsingDiagnostics()); + assert.isEmpty(program.getGlobalDiagnostics()); + assert.isEmpty(program.getSemanticDiagnostics()); + }); + }); } diff --git a/src/testRunner/unittests/publicApi.ts b/src/testRunner/unittests/publicApi.ts index cbb7e1b536a..79d4b9a2082 100644 --- a/src/testRunner/unittests/publicApi.ts +++ b/src/testRunner/unittests/publicApi.ts @@ -104,4 +104,23 @@ describe("unittests:: Public APIs:: getTypeAtLocation", () => { assert.ok(!(type.flags & ts.TypeFlags.Any)); assert.equal(type, checker.getTypeAtLocation(propertyAccess.name)); }); + + it("works on SourceFile", () => { + const content = `const foo = 1;`; + const host = new fakes.CompilerHost(vfs.createFromFileSystem( + Harness.IO, + /*ignoreCase*/ true, + { documents: [new documents.TextDocument("/file.ts", content)], cwd: "/" })); + + const program = ts.createProgram({ + host, + rootNames: ["/file.ts"], + options: { noLib: true } + }); + + const checker = program.getTypeChecker(); + const file = program.getSourceFile("/file.ts")!; + const type = checker.getTypeAtLocation(file); + assert.equal(type.flags, ts.TypeFlags.Any); + }); }); diff --git a/src/testRunner/unittests/semver.ts b/src/testRunner/unittests/semver.ts index b3447ca77b0..2e6a61fbad8 100644 --- a/src/testRunner/unittests/semver.ts +++ b/src/testRunner/unittests/semver.ts @@ -1,6 +1,29 @@ namespace ts { import theory = Utils.theory; describe("unittests:: semver", () => { + describe("VersionRange", () => { + function assertVersionRange(version: string, good: string[], bad: string[]): () => void { + return () => { + const range = VersionRange.tryParse(version)!; + assert(range); + for (const g of good) { + assert.isTrue(range.test(g), g); + } + for (const b of bad) { + assert.isFalse(range.test(b), b); + } + }; + } + it("< works", assertVersionRange("<3.8.0", ["3.6", "3.7"], ["3.8", "3.9", "4.0"])); + it("<= works", assertVersionRange("<=3.8.0", ["3.6", "3.7", "3.8"], ["3.9", "4.0"])); + it("> works", assertVersionRange(">3.8.0", ["3.9", "4.0"], ["3.6", "3.7", "3.8"])); + it(">= works", assertVersionRange(">=3.8.0", ["3.8", "3.9", "4.0"], ["3.6", "3.7"])); + + it("< works with prerelease", assertVersionRange("<3.8.0-0", ["3.6", "3.7"], ["3.8", "3.9", "4.0"])); + it("<= works with prerelease", assertVersionRange("<=3.8.0-0", ["3.6", "3.7"], ["3.8", "3.9", "4.0"])); + it("> works with prerelease", assertVersionRange(">3.8.0-0", ["3.8", "3.9", "4.0"], ["3.6", "3.7"])); + it(">= works with prerelease", assertVersionRange(">=3.8.0-0", ["3.8", "3.9", "4.0"], ["3.6", "3.7"])); + }); describe("Version", () => { function assertVersion(version: Version, [major, minor, patch, prerelease, build]: [number, number, number, string[]?, string[]?]) { assert.strictEqual(version.major, major); diff --git a/src/testRunner/unittests/services/convertToAsyncFunction.ts b/src/testRunner/unittests/services/convertToAsyncFunction.ts index 78a2f43f6c3..183f7bccb42 100644 --- a/src/testRunner/unittests/services/convertToAsyncFunction.ts +++ b/src/testRunner/unittests/services/convertToAsyncFunction.ts @@ -902,7 +902,7 @@ function [#|f|](): Promise { } ` ); - _testConvertToAsyncFunction("convertToAsyncFunction_PromiseAllAndThen", ` + _testConvertToAsyncFunction("convertToAsyncFunction_PromiseAllAndThen1", ` function [#|f|]() { return Promise.resolve().then(function () { return Promise.all([fetch("https://typescriptlang.org"), fetch("https://microsoft.com"), Promise.resolve().then(function () { @@ -921,6 +921,26 @@ function [#|f|]() { })]).then(res => res.toString()); }); } +` + ); + + _testConvertToAsyncFunction("convertToAsyncFunction_PromiseAllAndThen3", ` +function [#|f|]() { + return Promise.resolve().then(() => + Promise.all([fetch("https://typescriptlang.org"), fetch("https://microsoft.com"), Promise.resolve().then(function () { + return fetch("https://github.com"); + }).then(res => res.toString())])); +} +` + ); + + _testConvertToAsyncFunction("convertToAsyncFunction_PromiseAllAndThen4", ` +function [#|f|]() { + return Promise.resolve().then(() => + Promise.all([fetch("https://typescriptlang.org"), fetch("https://microsoft.com"), Promise.resolve().then(function () { + return fetch("https://github.com"); + })]).then(res => res.toString())); +} ` ); _testConvertToAsyncFunction("convertToAsyncFunction_Scope1", ` @@ -1124,6 +1144,27 @@ function [#|bar|](x: T): Promise { ` ); + _testConvertToAsyncFunction("convertToAsyncFunction_Return1", ` +function [#|f|](p: Promise) { + return p.catch((error: Error) => { + return Promise.reject(error); + }); +}` + ); + + _testConvertToAsyncFunction("convertToAsyncFunction_Return2", ` +function [#|f|](p: Promise) { + return p.catch((error: Error) => Promise.reject(error)); +}` + ); + + _testConvertToAsyncFunction("convertToAsyncFunction_Return3", ` +function [#|f|](p: Promise) { + return p.catch(function (error: Error) { + return Promise.reject(error); + }); +}` + ); _testConvertToAsyncFunction("convertToAsyncFunction_LocalReturn", ` function [#|f|]() { @@ -1352,7 +1393,7 @@ function [#|f|]() { } `); - _testConvertToAsyncFunction("convertToAsyncFunction_noArgs", ` + _testConvertToAsyncFunction("convertToAsyncFunction_noArgs1", ` function delay(millis: number): Promise { throw "no" } @@ -1364,7 +1405,21 @@ function [#|main2|]() { .then(() => { console.log("."); return delay(500); }) .then(() => { console.log("."); return delay(500); }) } -`); + `); + + _testConvertToAsyncFunction("convertToAsyncFunction_noArgs2", ` +function delay(millis: number): Promise { + throw "no" +} + +function [#|main2|]() { + console.log("Please wait. Loading."); + return delay(500) + .then(() => delay(500)) + .then(() => delay(500)) + .then(() => delay(500)) +} + `); _testConvertToAsyncFunction("convertToAsyncFunction_exportModifier", ` export function [#|foo|]() { @@ -1441,5 +1496,19 @@ function [#|get|]() { function [#|f|]() { return Promise.resolve().then(undefined, undefined, () => 1); }`); + + _testConvertToAsyncFunction("convertToAsyncFunction_callbackArgument", ` +function foo(props: any): void { + return props; +} + +const fn = (): Promise<(message: string) => void> => + new Promise(resolve => resolve((message: string) => foo(message))); + +function [#|f|]() { + return fn().then(res => res("test")); +} +`); + }); } diff --git a/src/testRunner/unittests/services/textChanges.ts b/src/testRunner/unittests/services/textChanges.ts index 7a5c9af03ff..325607745b6 100644 --- a/src/testRunner/unittests/services/textChanges.ts +++ b/src/testRunner/unittests/services/textChanges.ts @@ -619,6 +619,20 @@ import { changeTracker.insertNodeInListAfter(sourceFile, findChild("x", sourceFile), factory.createImportSpecifier(undefined, factory.createIdentifier("a"))); }); } + { + const runTest = (name: string, text: string) => runSingleFileTest(name, /*placeOpenBraceOnNewLineForFunctions*/ false, text, /*validateNodes*/ false, (sourceFile, changeTracker) => { + for (const specifier of ["x3", "x4", "x5"]) { + // eslint-disable-next-line boolean-trivia + changeTracker.insertNodeInListAfter(sourceFile, findChild("x2", sourceFile), factory.createImportSpecifier(undefined, factory.createIdentifier(specifier))); + } + }); + + const crlfText = "import {\r\nx1,\r\nx2\r\n} from \"bar\";"; + runTest("insertNodeInListAfter19", crlfText); + + const lfText = "import {\nx1,\nx2\n} from \"bar\";"; + runTest("insertNodeInListAfter20", lfText); + } { const text = ` class A { diff --git a/src/testRunner/unittests/tsbuild/declarationEmit.ts b/src/testRunner/unittests/tsbuild/declarationEmit.ts new file mode 100644 index 00000000000..6139f585b96 --- /dev/null +++ b/src/testRunner/unittests/tsbuild/declarationEmit.ts @@ -0,0 +1,79 @@ +namespace ts { + describe("unittests:: tsbuild:: declarationEmit", () => { + function getFiles(): vfs.FileSet { + return { + "/src/solution/tsconfig.base.json": JSON.stringify({ + compilerOptions: { + rootDir: "./", + outDir: "lib" + } + }), + "/src/solution/tsconfig.json": JSON.stringify({ + compilerOptions: { composite: true }, + references: [{ path: "./src" }], + include: [] + }), + "/src/solution/src/tsconfig.json": JSON.stringify({ + compilerOptions: { composite: true }, + references: [{ path: "./subProject" }, { path: "./subProject2" }], + include: [] + }), + "/src/solution/src/subProject/tsconfig.json": JSON.stringify({ + extends: "../../tsconfig.base.json", + compilerOptions: { composite: true }, + references: [{ path: "../common" }], + include: ["./index.ts"] + }), + "/src/solution/src/subProject/index.ts": Utils.dedent` +import { Nominal } from '../common/nominal'; +export type MyNominal = Nominal;`, + "/src/solution/src/subProject2/tsconfig.json": JSON.stringify({ + extends: "../../tsconfig.base.json", + compilerOptions: { composite: true }, + references: [{ path: "../subProject" }], + include: ["./index.ts"] + }), + "/src/solution/src/subProject2/index.ts": Utils.dedent` +import { MyNominal } from '../subProject/index'; +const variable = { + key: 'value' as MyNominal, +}; +export function getVar(): keyof typeof variable { + return 'key'; +}`, + "/src/solution/src/common/tsconfig.json": JSON.stringify({ + extends: "../../tsconfig.base.json", + compilerOptions: { composite: true }, + include: ["./nominal.ts"] + }), + "/src/solution/src/common/nominal.ts": Utils.dedent` +/// +export declare type Nominal = MyNominal;`, + "/src/solution/src/common/types.d.ts": Utils.dedent` +declare type MyNominal = T & { + specialKey: Name; +};`, + }; + } + verifyTsc({ + scenario: "declarationEmit", + subScenario: "when declaration file is referenced through triple slash", + fs: () => loadProjectFromFiles(getFiles()), + commandLineArgs: ["--b", "/src/solution/tsconfig.json", "--verbose"] + }); + + verifyTsc({ + scenario: "declarationEmit", + subScenario: "when declaration file is referenced through triple slash but uses no references", + fs: () => loadProjectFromFiles({ + ...getFiles(), + "/src/solution/tsconfig.json": JSON.stringify({ + extends: "./tsconfig.base.json", + compilerOptions: { composite: true }, + include: ["./src/**/*.ts"] + }), + }), + commandLineArgs: ["--b", "/src/solution/tsconfig.json", "--verbose"] + }); + }); +} diff --git a/src/testRunner/unittests/tsbuild/javascriptProjectEmit.ts b/src/testRunner/unittests/tsbuild/javascriptProjectEmit.ts index 450da2cd14f..058e5c0efb4 100644 --- a/src/testRunner/unittests/tsbuild/javascriptProjectEmit.ts +++ b/src/testRunner/unittests/tsbuild/javascriptProjectEmit.ts @@ -104,7 +104,8 @@ namespace ts { "extends": "../tsconfig.base.json", "compilerOptions": { "composite": true, - "outFile": "common.js" + "outFile": "common.js", + "bundledPackageName": "common" }, "include": ["nominal.js"] }`, @@ -119,7 +120,8 @@ namespace ts { "extends": "../tsconfig.base.json", "compilerOptions": { "composite": true, - "outFile": "sub-project.js" + "outFile": "sub-project.js", + "bundledPackageName": "sub" }, "references": [ { "path": "../common", "prepend": true } @@ -143,7 +145,8 @@ namespace ts { "extends": "../tsconfig.base.json", "compilerOptions": { "composite": true, - "outFile": "sub-project-2.js" + "outFile": "sub-project-2.js", + "bundledPackageName": "sub-2" }, "references": [ { "path": "../sub-project", "prepend": true } diff --git a/src/testRunner/unittests/tsbuild/outFile.ts b/src/testRunner/unittests/tsbuild/outFile.ts index e1da4118599..1f6685c873e 100644 --- a/src/testRunner/unittests/tsbuild/outFile.ts +++ b/src/testRunner/unittests/tsbuild/outFile.ts @@ -658,7 +658,8 @@ ${internal} enum internalEnum { a, b, c }`); declarationMap: true, skipDefaultLibCheck: true, sourceMap: true, - outFile: "./bin/first-output.js" + outFile: "./bin/first-output.js", + bundledPackageName: "first" }, files: [sources[Project.first][Source.ts][Part.one]] })); @@ -669,7 +670,8 @@ ${internal} enum internalEnum { a, b, c }`); declarationMap: false, stripInternal: true, sourceMap: true, - outFile: "./thirdjs/output/third-output.js" + outFile: "./thirdjs/output/third-output.js", + bundledPackageName: "third" }, references: [{ path: "../first", prepend: true }], files: [sources[Project.third][Source.ts][Part.one]] diff --git a/src/testRunner/unittests/tsbuild/watchMode.ts b/src/testRunner/unittests/tsbuild/watchMode.ts index e04950cc42d..a0442229ba8 100644 --- a/src/testRunner/unittests/tsbuild/watchMode.ts +++ b/src/testRunner/unittests/tsbuild/watchMode.ts @@ -326,13 +326,13 @@ export class someClass2 { }`), const coreTsConfig: File = { path: core[0].path, content: JSON.stringify({ - compilerOptions: { composite: true, declaration: true, outFile: "index.js" } + compilerOptions: { composite: true, declaration: true, outFile: "index.js", bundledPackageName: "core" } }) }; const logicTsConfig: File = { path: logic[0].path, content: JSON.stringify({ - compilerOptions: { composite: true, declaration: true, outFile: "index.js" }, + compilerOptions: { composite: true, declaration: true, outFile: "index.js", bundledPackageName: "logic" }, references: [{ path: "../core", prepend: true }] }) }; diff --git a/src/testRunner/unittests/tscWatch/helpers.ts b/src/testRunner/unittests/tscWatch/helpers.ts index 400958e5527..ad0ea2a95e9 100644 --- a/src/testRunner/unittests/tscWatch/helpers.ts +++ b/src/testRunner/unittests/tscWatch/helpers.ts @@ -267,7 +267,7 @@ namespace ts.tscWatch { export function getDiagnosticModuleNotFoundOfFile(program: Program, file: File, moduleName: string) { const quotedModuleName = `"${moduleName}"`; - return getDiagnosticOfFileFromProgram(program, file.path, file.content.indexOf(quotedModuleName), quotedModuleName.length, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations, moduleName); + return getDiagnosticOfFileFromProgram(program, file.path, file.content.indexOf(quotedModuleName), quotedModuleName.length, Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option, moduleName); } export function runQueuedTimeoutCallbacks(sys: WatchedSystem) { diff --git a/src/testRunner/unittests/tscWatch/programUpdates.ts b/src/testRunner/unittests/tscWatch/programUpdates.ts index 63888db6bf7..805f9f955b4 100644 --- a/src/testRunner/unittests/tscWatch/programUpdates.ts +++ b/src/testRunner/unittests/tscWatch/programUpdates.ts @@ -481,6 +481,26 @@ export class A { changes: emptyArray }); + verifyTscWatch({ + scenario, + subScenario: "change module to none", + commandLineArgs: ["-w", "-p", configFilePath], + sys: () => { + const file1 = { + path: "/a/b/f1.ts", + content: "export {}\ndeclare global {}" + }; + return createWatchedSystem([file1, libFile, configFile]); + }, + changes: [{ + caption: "change `module` to 'none'", + timeouts: checkSingleTimeoutQueueLengthAndRun, + change: sys => { + sys.writeFile(configFilePath, JSON.stringify({ compilerOptions: { module: "none" } })); + } + }] + }); + it("correctly migrate files between projects", () => { const file1 = { path: "/a/b/f1.ts", @@ -1578,5 +1598,33 @@ import { x } from "../b";`), }, ] }); + + verifyTscWatch({ + scenario, + subScenario: "updates emit on jsx option change", + commandLineArgs: ["-w"], + sys: () => { + const index: File = { + path: `${projectRoot}/index.tsx`, + content: `declare var React: any;\nconst d =
;` + }; + const configFile: File = { + path: `${projectRoot}/tsconfig.json`, + content: JSON.stringify({ + compilerOptions: { + jsx: "preserve" + } + }) + }; + return createWatchedSystem([index, configFile, libFile], { currentDirectory: projectRoot }); + }, + changes: [ + { + caption: "Update 'jsx' to 'react'", + change: sys => sys.writeFile(`${projectRoot}/tsconfig.json`, '{ "compilerOptions": { "jsx": "react" } }'), + timeouts: runQueuedTimeoutCallbacks, + }, + ] + }); }); } diff --git a/src/testRunner/unittests/tsserver/autoImportProvider.ts b/src/testRunner/unittests/tsserver/autoImportProvider.ts index 031af230c52..36d17d59d06 100644 --- a/src/testRunner/unittests/tsserver/autoImportProvider.ts +++ b/src/testRunner/unittests/tsserver/autoImportProvider.ts @@ -229,6 +229,26 @@ namespace ts.projectSystem { host.writeFile(packageJson.path, packageJson.content); assert.ok(projectService.configuredProjects.get(tsconfig.path)!.getLanguageService().getAutoImportProvider()); }); + + it("Does not create an auto import provider if there are too many dependencies", () => { + const createPackage = (i: number): File[] => ([ + { path: `/node_modules/package${i}/package.json`, content: `{ "name": "package${i}" }` }, + { path: `/node_modules/package${i}/index.d.ts`, content: `` } + ]); + + const packages = []; + for (let i = 0; i < 11; i++) { + packages.push(createPackage(i)); + } + + const dependencies = packages.reduce((hash, p) => ({ ...hash, [JSON.parse(p[0].content).name]: "*" }), {}); + const packageJson: File = { path: "/package.json", content: JSON.stringify(dependencies) }; + const { projectService, session } = setup([ ...flatten(packages), indexTs, tsconfig, packageJson ]); + + openFilesForSession([indexTs], session); + const project = projectService.configuredProjects.get(tsconfig.path)!; + assert.isUndefined(project.getPackageJsonAutoImportProvider()); + }); }); describe("unittests:: tsserver:: autoImportProvider - monorepo", () => { @@ -263,6 +283,25 @@ namespace ts.projectSystem { // Project for A is created - ensure it doesn't have an autoImportProvider assert.isUndefined(projectService.configuredProjects.get("/packages/a/tsconfig.json")!.getLanguageService().getAutoImportProvider()); }); + + it("Does not close when root files are redirects that don't actually exist", () => { + const files = [ + // packages/a + { path: "/packages/a/package.json", content: `{ "dependencies": { "b": "*" } }` }, + { path: "/packages/a/tsconfig.json", content: `{ "compilerOptions": { "composite": true }, "references": [{ "path": "./node_modules/b" }] }` }, + { path: "/packages/a/index.ts", content: "" }, + + // packages/b + { path: "/packages/a/node_modules/b/package.json", content: `{ "types": "dist/index.d.ts" }` }, + { path: "/packages/a/node_modules/b/tsconfig.json", content: `{ "compilerOptions": { "composite": true, "outDir": "dist" } }` }, + { path: "/packages/a/node_modules/b/index.ts", content: `export class B {}` } + ]; + + const { projectService, session } = setup(files); + openFilesForSession([files[2]], session); + assert.isDefined(projectService.configuredProjects.get("/packages/a/tsconfig.json")!.getPackageJsonAutoImportProvider()); + assert.isDefined(projectService.configuredProjects.get("/packages/a/tsconfig.json")!.getPackageJsonAutoImportProvider()); + }); }); function setup(files: File[]) { diff --git a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts index e554ee4219c..b4a6c2f12f2 100644 --- a/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts +++ b/src/testRunner/unittests/tsserver/cachingFileSystemInformation.ts @@ -240,8 +240,8 @@ namespace ts.projectSystem { let diags = project.getLanguageService().getSemanticDiagnostics(root.path); assert.equal(diags.length, 1); const diag = diags[0]; - assert.equal(diag.code, Diagnostics.Cannot_find_module_0_or_its_corresponding_type_declarations.code); - assert.equal(flattenDiagnosticMessageText(diag.messageText, "\n"), "Cannot find module 'bar' or its corresponding type declarations."); + assert.equal(diag.code, Diagnostics.Cannot_find_module_0_Did_you_mean_to_set_the_moduleResolution_option_to_node_or_to_add_aliases_to_the_paths_option.code); + assert.equal(flattenDiagnosticMessageText(diag.messageText, "\n"), "Cannot find module 'bar'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option?"); callsTrackingHost.verifyCalledOn(CalledMapsWithSingleArg.fileExists, imported.path); @@ -544,7 +544,7 @@ namespace ts.projectSystem { const otherFiles = [packageJson]; const host = createServerHost(projectFiles.concat(otherFiles)); const projectService = createProjectService(host); - projectService.setHostConfiguration({ preferences: { includePackageJsonAutoImports: "none" } }); + projectService.setHostConfiguration({ preferences: { includePackageJsonAutoImports: "off" } }); const { configFileName } = projectService.openClientFile(app.path); assert.equal(configFileName, tsconfigJson.path as server.NormalizedPath, `should find config`); // TODO: GH#18217 const recursiveWatchedDirectories: string[] = [`${appFolder}`, `${appFolder}/node_modules`].concat(getNodeModuleDirectories(getDirectoryPath(appFolder))); diff --git a/src/testRunner/unittests/tsserver/completions.ts b/src/testRunner/unittests/tsserver/completions.ts index 919295bad80..2117d8924aa 100644 --- a/src/testRunner/unittests/tsserver/completions.ts +++ b/src/testRunner/unittests/tsserver/completions.ts @@ -44,6 +44,7 @@ namespace ts.projectSystem { isGlobalCompletion: true, isMemberCompletion: false, isNewIdentifierLocation: false, + optionalReplacementSpan: { start: { line: 1, offset: 1 }, end: { line: 1, offset: 4 } }, entries: [entry], }); diff --git a/src/testRunner/unittests/tsserver/helpers.ts b/src/testRunner/unittests/tsserver/helpers.ts index c79eee0b422..5ce4ed734fd 100644 --- a/src/testRunner/unittests/tsserver/helpers.ts +++ b/src/testRunner/unittests/tsserver/helpers.ts @@ -449,11 +449,11 @@ namespace ts.projectSystem { } export function checkProjectActualFiles(project: server.Project, expectedFiles: readonly string[]) { - checkArray(`${server.ProjectKind[project.projectKind]} project, actual files`, project.getFileNames(), expectedFiles); + checkArray(`${server.ProjectKind[project.projectKind]} project: ${project.getProjectName()}:: actual files`, project.getFileNames(), expectedFiles); } export function checkProjectRootFiles(project: server.Project, expectedFiles: readonly string[]) { - checkArray(`${server.ProjectKind[project.projectKind]} project, rootFileNames`, project.getRootFiles(), expectedFiles); + checkArray(`${server.ProjectKind[project.projectKind]} project: ${project.getProjectName()}::, rootFileNames`, project.getRootFiles(), expectedFiles); } export function mapCombinedPathsInAncestor(dir: string, path2: string, mapAncestor: (ancestor: string) => boolean) { diff --git a/src/testRunner/unittests/tsserver/inferredProjects.ts b/src/testRunner/unittests/tsserver/inferredProjects.ts index 8676e2a6279..216273976e2 100644 --- a/src/testRunner/unittests/tsserver/inferredProjects.ts +++ b/src/testRunner/unittests/tsserver/inferredProjects.ts @@ -86,7 +86,7 @@ namespace ts.projectSystem { const proj = projectService.inferredProjects[0]; assert.isDefined(proj); - assert.isTrue(proj.languageServiceEnabled); + assert.isFalse(proj.languageServiceEnabled); }); it("project settings for inferred projects", () => { diff --git a/src/testRunner/unittests/tsserver/metadataInResponse.ts b/src/testRunner/unittests/tsserver/metadataInResponse.ts index 10b1c58d737..2ca20ff4046 100644 --- a/src/testRunner/unittests/tsserver/metadataInResponse.ts +++ b/src/testRunner/unittests/tsserver/metadataInResponse.ts @@ -55,8 +55,8 @@ namespace ts.projectSystem { offset: aTs.content.indexOf("this.") + 1 + "this.".length }; const expectedCompletionEntries: readonly protocol.CompletionEntry[] = [ - { name: "foo", kind: ScriptElementKind.memberFunctionElement, kindModifiers: "", sortText: "0" }, - { name: "prop", kind: ScriptElementKind.memberVariableElement, kindModifiers: "", sortText: "0" } + { name: "foo", kind: ScriptElementKind.memberFunctionElement, kindModifiers: "", sortText: Completions.SortText.LocationPriority }, + { name: "prop", kind: ScriptElementKind.memberVariableElement, kindModifiers: "", sortText: Completions.SortText.LocationPriority } ]; it("can pass through metadata when the command returns array", () => { @@ -80,6 +80,10 @@ namespace ts.projectSystem { isGlobalCompletion: false, isMemberCompletion: true, isNewIdentifierLocation: false, + optionalReplacementSpan: { + start: { line: 1, offset: aTs.content.indexOf("prop;") + 1 }, + end: { line: 1, offset: aTs.content.indexOf("prop;") + 1 + "prop".length } + }, entries: expectedCompletionEntries }); }); diff --git a/src/testRunner/unittests/tsserver/navTo.ts b/src/testRunner/unittests/tsserver/navTo.ts index e447a312e2f..1b606199d38 100644 --- a/src/testRunner/unittests/tsserver/navTo.ts +++ b/src/testRunner/unittests/tsserver/navTo.ts @@ -61,8 +61,12 @@ namespace ts.projectSystem { export const ghijkl = a.abcdef;` }; const host = createServerHost([configFile1, file1, configFile2, file2]); - const session = createSession(host); + const logger = createHasErrorMessageLogger().logger; + const logs: string[] = []; + logger.info = s => logs.push(s); + const session = createSession(host, { logger }); openFilesForSession([file1, file2], session); + logs.length = 0; const request = makeSessionRequest(CommandNames.Navto, { searchValue: "abcdef", file: file1.path }); const items = session.executeCommand(request).response as protocol.NavtoItem[]; @@ -70,6 +74,62 @@ export const ghijkl = a.abcdef;` const item = items[0]; assert.strictEqual(item.name, "abcdef"); assert.strictEqual(item.file, file1.path); + assert.deepEqual(logs, []); + }); + + it("should de-duplicate symbols when searching all projects", () => { + const solutionConfig: File = { + path: "/tsconfig.json", + content: JSON.stringify({ + references: [{ path: "./a" }, { path: "./b" }], + files: [], + }) + }; + const configFile1: File = { + path: "/a/tsconfig.json", + content: `{ + "compilerOptions": { + "composite": true + } +}` + }; + const file1: File = { + path: "/a/index.ts", + content: "export const abcdef = 1;" + }; + const configFile2: File = { + path: "/b/tsconfig.json", + content: `{ + "compilerOptions": { + "composite": true + }, + "references": [ + { "path": "../a" } + ] +}` + }; + const file2: File = { + path: "/b/index.ts", + content: `import a = require("../a"); +export const ghijkl = a.abcdef;` + }; + const host = createServerHost([configFile1, file1, configFile2, file2, solutionConfig]); + const logger = createHasErrorMessageLogger().logger; + const logs: string[] = []; + logger.info = s => logs.push(s); + const session = createSession(host, { logger }); + openFilesForSession([file1], session); + logs.length = 0; + + const request = makeSessionRequest(CommandNames.Navto, { searchValue: "abcdef" }); + const items = session.executeCommand(request).response as protocol.NavtoItem[]; + assert.strictEqual(items.length, 1); + const item = items[0]; + assert.strictEqual(item.name, "abcdef"); + assert.strictEqual(item.file, file1.path); + // Cannt check logs as empty since it loads projects and writes information for those in the log + assert.isFalse(contains(logs, "Search path: /a")); + assert.isFalse(contains(logs, "For info: /a/index.ts :: Config file name: /a/tsconfig.json")); }); it("should work with Deprecated", () => { diff --git a/src/testRunner/unittests/tsserver/packageJsonInfo.ts b/src/testRunner/unittests/tsserver/packageJsonInfo.ts index efc977a335c..b931d984c12 100644 --- a/src/testRunner/unittests/tsserver/packageJsonInfo.ts +++ b/src/testRunner/unittests/tsserver/packageJsonInfo.ts @@ -82,6 +82,23 @@ namespace ts.projectSystem { assert.ok(packageJsonInfo2.peerDependencies); assert.ok(packageJsonInfo2.optionalDependencies); }); + + it("handles empty package.json", () => { + const packageJsonContent = ""; + const { projectService, host } = setup([tsConfig, { path: packageJson.path, content: packageJsonContent }]); + projectService.getPackageJsonsVisibleToFile("/src/whatever/blah.ts" as Path); + const packageJsonInfo = projectService.packageJsonCache.getInDirectory("/" as Path)!; + assert.isFalse(packageJsonInfo.parseable); + + host.writeFile(packageJson.path, packageJson.content); + projectService.getPackageJsonsVisibleToFile("/src/whatever/blah.ts" as Path); + const packageJsonInfo2 = projectService.packageJsonCache.getInDirectory("/" as Path)!; + assert.ok(packageJsonInfo2); + assert.ok(packageJsonInfo2.dependencies); + assert.ok(packageJsonInfo2.devDependencies); + assert.ok(packageJsonInfo2.peerDependencies); + assert.ok(packageJsonInfo2.optionalDependencies); + }); }); function setup(files: readonly File[] = [tsConfig, packageJson]) { diff --git a/src/testRunner/unittests/tsserver/semanticOperationsOnSyntaxServer.ts b/src/testRunner/unittests/tsserver/partialSemanticServer.ts similarity index 53% rename from src/testRunner/unittests/tsserver/semanticOperationsOnSyntaxServer.ts rename to src/testRunner/unittests/tsserver/partialSemanticServer.ts index 09b6df7c42a..d821ccc1a36 100644 --- a/src/testRunner/unittests/tsserver/semanticOperationsOnSyntaxServer.ts +++ b/src/testRunner/unittests/tsserver/partialSemanticServer.ts @@ -1,22 +1,33 @@ namespace ts.projectSystem { - describe("unittests:: tsserver:: Semantic operations on Syntax server", () => { + describe("unittests:: tsserver:: Semantic operations on PartialSemantic server", () => { function setup() { const file1: File = { path: `${tscWatch.projectRoot}/a.ts`, - content: `import { y } from "./b"; + content: `import { y, cc } from "./b"; +import { something } from "something"; class c { prop = "hello"; foo() { return this.prop; } }` }; const file2: File = { path: `${tscWatch.projectRoot}/b.ts`, - content: "export const y = 10;" + content: `export { cc } from "./c"; +import { something } from "something"; + export const y = 10;` + }; + const file3: File = { + path: `${tscWatch.projectRoot}/c.ts`, + content: `export const cc = 10;` + }; + const something: File = { + path: `${tscWatch.projectRoot}/node_modules/something/index.d.ts`, + content: "export const something = 10;" }; const configFile: File = { path: `${tscWatch.projectRoot}/tsconfig.json`, content: "{}" }; - const host = createServerHost([file1, file2, libFile, configFile]); - const session = createSession(host, { syntaxOnly: true, useSingleInferredProject: true }); - return { host, session, file1, file2, configFile }; + const host = createServerHost([file1, file2, file3, something, libFile, configFile]); + const session = createSession(host, { serverMode: LanguageServiceMode.PartialSemantic, useSingleInferredProject: true }); + return { host, session, file1, file2, file3, something, configFile }; } it("open files are added to inferred project even if config file is present and semantic operations succeed", () => { @@ -25,7 +36,7 @@ class c { prop = "hello"; foo() { return this.prop; } }` openFilesForSession([file1], session); checkNumberOfProjects(service, { inferredProjects: 1 }); const project = service.inferredProjects[0]; - checkProjectActualFiles(project, [libFile.path, file1.path]); // Import is not resolved + checkProjectActualFiles(project, [libFile.path, file1.path]); // no imports are resolved verifyCompletions(); openFilesForSession([file2], session); @@ -79,7 +90,7 @@ class c { prop = "hello"; foo() { return this.prop; } }` session.executeCommand(request); } catch (e) { - assert.equal(e.message, `Request: semanticDiagnosticsSync not allowed on syntaxServer`); + assert.equal(e.message, `Request: semanticDiagnosticsSync not allowed in LanguageServiceMode.PartialSemantic`); hasException = true; } assert.isTrue(hasException); @@ -90,7 +101,7 @@ class c { prop = "hello"; foo() { return this.prop; } }` project.getLanguageService().getSemanticDiagnostics(file1.path); } catch (e) { - assert.equal(e.message, `LanguageService Operation: getSemanticDiagnostics not allowed on syntaxServer`); + assert.equal(e.message, `LanguageService Operation: getSemanticDiagnostics not allowed in LanguageServiceMode.PartialSemantic`); hasException = true; } assert.isTrue(hasException); @@ -109,5 +120,57 @@ class c { prop = "hello"; foo() { return this.prop; } }` const project = service.inferredProjects[0]; checkProjectActualFiles(project, [libFile.path, file1.path]); // Should not contain atTypes }); + + it("should not include referenced files from unopened files", () => { + const file1: File = { + path: `${tscWatch.projectRoot}/a.ts`, + content: `/// +/// +function fooA() { }` + }; + const file2: File = { + path: `${tscWatch.projectRoot}/b.ts`, + content: `/// +/// +function fooB() { }` + }; + const file3: File = { + path: `${tscWatch.projectRoot}/c.ts`, + content: `function fooC() { }` + }; + const something: File = { + path: `${tscWatch.projectRoot}/node_modules/something/index.d.ts`, + content: "function something() {}" + }; + const configFile: File = { + path: `${tscWatch.projectRoot}/tsconfig.json`, + content: "{}" + }; + const host = createServerHost([file1, file2, file3, something, libFile, configFile]); + const session = createSession(host, { serverMode: LanguageServiceMode.PartialSemantic, useSingleInferredProject: true }); + const service = session.getProjectService(); + openFilesForSession([file1], session); + checkNumberOfProjects(service, { inferredProjects: 1 }); + const project = service.inferredProjects[0]; + checkProjectActualFiles(project, [libFile.path, file1.path]); // no resolve + }); + + it("should not crash when external module name resolution is reused", () => { + const { session, file1, file2, file3 } = setup(); + const service = session.getProjectService(); + openFilesForSession([file1], session); + checkNumberOfProjects(service, { inferredProjects: 1 }); + const project = service.inferredProjects[0]; + checkProjectActualFiles(project, [libFile.path, file1.path]); + + // Close the file that contains non relative external module name and open some file that doesnt have non relative external module import + closeFilesForSession([file1], session); + openFilesForSession([file3], session); + checkProjectActualFiles(project, [libFile.path, file3.path]); + + // Open file with non relative external module name + openFilesForSession([file2], session); + checkProjectActualFiles(project, [libFile.path, file2.path, file3.path]); + }); }); } diff --git a/src/testRunner/unittests/tsserver/projectReferenceErrors.ts b/src/testRunner/unittests/tsserver/projectReferenceErrors.ts index 0fb2f8d883f..371e0720eb7 100644 --- a/src/testRunner/unittests/tsserver/projectReferenceErrors.ts +++ b/src/testRunner/unittests/tsserver/projectReferenceErrors.ts @@ -149,7 +149,7 @@ fnErr(); { line: 4, offset: 5 }, { line: 4, offset: 10 }, Diagnostics.Module_0_has_no_exported_member_1, - [`"../decls/fns"`, "fnErr"], + [`"../dependency/fns"`, "fnErr"], "error", ) ], @@ -193,7 +193,7 @@ let x: string = 10;` }; const dependencyConfig: File = { path: `${dependecyLocation}/tsconfig.json`, - content: JSON.stringify({ compilerOptions: { composite: true, outFile: "../dependency.js" } }) + content: JSON.stringify({ compilerOptions: { composite: true, outFile: "../dependency.js", bundledPackageName: "dep" } }) }; const usageTs: File = { path: `${usageLocation}/usage.ts`, @@ -205,7 +205,7 @@ fnErr(); const usageConfig: File = { path: `${usageLocation}/tsconfig.json`, content: JSON.stringify({ - compilerOptions: { composite: true, outFile: "../usage.js" }, + compilerOptions: { composite: true, outFile: "../usage.js", bundledPackageName: "usage" }, references: [{ path: "../dependency" }] }) }; diff --git a/src/testRunner/unittests/tsserver/projectReferences.ts b/src/testRunner/unittests/tsserver/projectReferences.ts index 8da081d82c1..44ba7911a97 100644 --- a/src/testRunner/unittests/tsserver/projectReferences.ts +++ b/src/testRunner/unittests/tsserver/projectReferences.ts @@ -1825,11 +1825,16 @@ bar(); }); describe("when default project is solution project", () => { - interface VerifySolutionScenario { + interface Setup { + solutionOptions?: CompilerOptions; + solutionFiles?: string[]; configRefs: string[]; additionalFiles: readonly File[]; - additionalProjects: readonly { projectName: string, files: readonly string[] }[]; expectedOpenEvents: protocol.Event[]; + } + interface VerifySolutionScenario extends Setup { + solutionProject?: readonly string[]; + additionalProjects: readonly { projectName: string, files: readonly string[] }[]; expectedReloadEvents: protocol.Event[]; expectedReferences: protocol.ReferencesResponseBody; expectedReferencesFromDtsProject: protocol.ReferencesResponseBody; @@ -1873,15 +1878,13 @@ export { foo }; const fileResolvingToMainDts: File = { path: `${tscWatch.projectRoot}/indirect3/main.ts`, content: `import { foo } from 'main'; -foo;` +foo; +export function bar() {}` }; const tsconfigSrcPath = `${tscWatch.projectRoot}/tsconfig-src.json`; const tsconfigPath = `${tscWatch.projectRoot}/tsconfig.json`; - function verifySolutionScenario({ - configRefs, additionalFiles, additionalProjects, - expectedOpenEvents, expectedReloadEvents, - expectedReferences, expectedReferencesFromDtsProject - }: VerifySolutionScenario) { + const dummyFilePath = "/dummy/dummy.ts"; + function setup({ solutionFiles, solutionOptions, configRefs, additionalFiles, expectedOpenEvents }: Setup) { const tsconfigSrc: File = { path: tsconfigSrcPath, content: JSON.stringify({ @@ -1896,12 +1899,13 @@ foo;` const tsconfig: File = { path: tsconfigPath, content: JSON.stringify({ + ... (solutionOptions ? { compilerOptions: solutionOptions } : {}), references: configRefs.map(path => ({ path })), - files: [] + files: solutionFiles || [] }) }; const dummyFile: File = { - path: "/dummy/dummy.ts", + path: dummyFilePath, content: "let a = 10;" }; const host = createServerHost([ @@ -1913,8 +1917,17 @@ foo;` const session = createSession(host, { canUseEvents: true }); const service = session.getProjectService(); service.openClientFile(main.path); - verifyProjects(/*includeConfigured*/ true, /*includeDummy*/ false); checkEvents(session, expectedOpenEvents); + return { session, service, host, tsconfigSrc, tsconfig }; + } + + function verifySolutionScenario(input: VerifySolutionScenario) { + const { session, service, host, tsconfigSrc, tsconfig } = setup(input); + const { + solutionProject, additionalProjects, expectedReloadEvents, + expectedReferences, expectedReferencesFromDtsProject + } = input; + verifyProjects(/*includeConfigured*/ true, /*includeDummy*/ false); const info = service.getScriptInfoForPath(main.path as Path)!; const project = service.configuredProjects.get(tsconfigSrc.path)!; assert.equal(info.getDefaultProject(), project); @@ -1924,17 +1937,17 @@ foo;` verifyGetErrRequestNoErrors({ session, host, files: [main] }); // Verify collection of script infos - service.openClientFile(dummyFile.path); + service.openClientFile(dummyFilePath); verifyProjects(/*includeConfigured*/ true, /*includeDummy*/ true); service.closeClientFile(main.path); - service.closeClientFile(dummyFile.path); - service.openClientFile(dummyFile.path); + service.closeClientFile(dummyFilePath); + service.openClientFile(dummyFilePath); verifyProjects(/*includeConfigured*/ false, /*includeDummy*/ true); service.openClientFile(main.path); - service.closeClientFile(dummyFile.path); - service.openClientFile(dummyFile.path); + service.closeClientFile(dummyFilePath); + service.openClientFile(dummyFilePath); verifyProjects(/*includeConfigured*/ true, /*includeDummy*/ true); // Verify Reload projects @@ -1951,7 +1964,7 @@ foo;` assert.deepEqual(response, expectedReferences); service.closeClientFile(main.path); - service.closeClientFile(dummyFile.path); + service.closeClientFile(dummyFilePath); // Verify when declaration map references the file service.openClientFile(fileResolvingToMainDts.path); @@ -1971,12 +1984,12 @@ foo;` checkNumberOfProjects(service, { configuredProjects, inferredProjects }); if (includeConfigured) { checkProjectActualFiles(service.configuredProjects.get(tsconfigSrc.path)!, [tsconfigSrc.path, main.path, helper.path, libFile.path]); - checkProjectActualFiles(service.configuredProjects.get(tsconfig.path)!, [tsconfig.path]); + checkProjectActualFiles(service.configuredProjects.get(tsconfig.path)!, solutionProject || [tsconfig.path]); additionalProjects.forEach(({ projectName, files }) => checkProjectActualFiles(service.configuredProjects.get(projectName)!, files)); } if (includeDummy) { - checkProjectActualFiles(service.inferredProjects[0], [dummyFile.path, libFile.path]); + checkProjectActualFiles(service.inferredProjects[0], [dummyFilePath, libFile.path]); } } } @@ -2061,14 +2074,15 @@ foo;` ]; } - function getIndirectProject(postfix: string) { + function getIndirectProject(postfix: string, optionsToExtend?: CompilerOptions) { const tsconfigIndirect: File = { path: `${tscWatch.projectRoot}/tsconfig-indirect${postfix}.json`, content: JSON.stringify({ compilerOptions: { composite: true, outDir: "./target/", - baseUrl: "./src/" + baseUrl: "./src/", + ...optionsToExtend }, files: [`./indirect${postfix}/main.ts`], references: [{ path: "./tsconfig-src.json" }] @@ -2081,6 +2095,66 @@ foo;` return { tsconfigIndirect, indirect }; } + interface VerifyProjects { + configuredProjects: readonly { projectName: string, files: readonly string[] }[]; + inferredProjects: readonly (readonly string[])[]; + } + + interface VerifyDisableReferencedProjectLoad extends Setup { + expectedProjectsOnOpen: VerifyProjects; + expectedProjectsOnDummyOpen?: VerifyProjects; + expectedProjectsOnReload?: VerifyProjects; + expectedDefaultProject: (service: server.ProjectService) => server.Project; + expectedDefaultConfiguredProject: (service: server.ProjectService) => server.ConfiguredProject | undefined; + expectedReloadEvents: protocol.Event[]; + } + + function verifyDisableReferencedProjectLoad(input: VerifyDisableReferencedProjectLoad) { + const { session, service } = setup(input); + const { expectedProjectsOnOpen, expectedDefaultProject, expectedDefaultConfiguredProject, expectedReloadEvents } = input; + const expectedProjectsOnOnlyDummy: VerifyProjects = { + configuredProjects: emptyArray, + inferredProjects: [ + [dummyFilePath, libFile.path], + ] + }; + const expectedProjectsOnDummyOpen = input.expectedProjectsOnDummyOpen || { + configuredProjects: expectedProjectsOnOpen.configuredProjects, + inferredProjects: expectedProjectsOnOnlyDummy.inferredProjects, + }; + const expectedProjectsOnReload = input.expectedProjectsOnReload || expectedProjectsOnDummyOpen; + + verifyProjects(expectedProjectsOnOpen); + const info = service.getScriptInfoForPath(main.path as Path)!; + assert.equal(info.getDefaultProject(), expectedDefaultProject(service)); + assert.equal(service.findDefaultConfiguredProject(info), expectedDefaultConfiguredProject(service)); + + // Verify collection of script infos + service.openClientFile(dummyFilePath); + verifyProjects(expectedProjectsOnDummyOpen); + + service.closeClientFile(main.path); + service.closeClientFile(dummyFilePath); + service.openClientFile(dummyFilePath); + verifyProjects(expectedProjectsOnOnlyDummy); + + service.openClientFile(main.path); + + // Verify Reload projects + session.clearMessages(); + service.reloadProjects(); + checkEvents(session, expectedReloadEvents); + verifyProjects(expectedProjectsOnReload); + + function verifyProjects(expected: VerifyProjects) { + checkNumberOfProjects(service, { configuredProjects: expected.configuredProjects.length, inferredProjects: expected.inferredProjects.length }); + expected.configuredProjects.forEach(({ projectName, files }) => + checkProjectActualFiles(service.configuredProjects.get(projectName)!, files)); + expected.inferredProjects.forEach((files, index) => + checkProjectActualFiles(service.inferredProjects[index], files)); + } + } + it("when project is directly referenced by solution", () => { const expectedReferences = expectedReferencesResponse(); verifySolutionScenario({ @@ -2150,6 +2224,317 @@ foo;` } }); }); + + it("disables looking into the child project if disableReferencedProjectLoad is set", () => { + const expectedProjectsOnOpen: VerifyProjects = { + configuredProjects: [ + { projectName: tsconfigPath, files: [tsconfigPath] }, + ], + inferredProjects: [ + [main.path, libFile.path], + ] + }; + verifyDisableReferencedProjectLoad({ + solutionOptions: { disableReferencedProjectLoad: true }, + configRefs: ["./tsconfig-src.json"], + additionalFiles: emptyArray, + expectedOpenEvents: [ + ...expectedSolutionLoadAndTelemetry(), + configFileDiagEvent(main.path, tsconfigPath, []) + ], + expectedDefaultProject: service => service.inferredProjects[0], + expectedDefaultConfiguredProject: returnUndefined, + expectedProjectsOnOpen, + expectedProjectsOnDummyOpen: { + configuredProjects: emptyArray, + inferredProjects: [ + ...expectedProjectsOnOpen.inferredProjects, + [dummyFilePath, libFile.path], + ] + }, + expectedProjectsOnReload: { + configuredProjects: expectedProjectsOnOpen.configuredProjects, + inferredProjects: [ + [dummyFilePath, libFile.path], + ...expectedProjectsOnOpen.inferredProjects, + ] + }, + expectedReloadEvents: expectedReloadEvent(tsconfigPath) + }); + }); + + it("disables looking into the child project if disableReferencedProjectLoad is set in indirect project", () => { + const { tsconfigIndirect, indirect } = getIndirectProject("1", { disableReferencedProjectLoad: true }); + const expectedProjectsOnOpen: VerifyProjects = { + configuredProjects: [ + { projectName: tsconfigPath, files: [tsconfigPath] }, + { projectName: tsconfigIndirect.path, files: [tsconfigIndirect.path, main.path, helper.path, indirect.path, libFile.path] }, + ], + inferredProjects: emptyArray + }; + verifyDisableReferencedProjectLoad({ + configRefs: ["./tsconfig-indirect1.json"], + additionalFiles: [tsconfigIndirect, indirect], + expectedOpenEvents: [ + ...expectedSolutionLoadAndTelemetry(), + ...expectedProjectReferenceLoadAndTelemetry(tsconfigIndirect.path), + configFileDiagEvent(main.path, tsconfigIndirect.path, []) + ], + expectedDefaultProject: service => service.configuredProjects.get(tsconfigIndirect.path)!, + expectedDefaultConfiguredProject: returnUndefined, + expectedProjectsOnOpen, + expectedReloadEvents: [ + ...expectedReloadEvent(tsconfigPath), + ...expectedReloadEvent(tsconfigIndirect.path), + ] + }); + }); + + it("disables looking into the child project if disableReferencedProjectLoad is set in first indirect project but not in another one", () => { + const { tsconfigIndirect, indirect } = getIndirectProject("1", { disableReferencedProjectLoad: true }); + const { tsconfigIndirect: tsconfigIndirect2, indirect: indirect2 } = getIndirectProject("2"); + const expectedProjectsOnOpen: VerifyProjects = { + configuredProjects: [ + { projectName: tsconfigPath, files: [tsconfigPath] }, + { projectName: tsconfigIndirect.path, files: [tsconfigIndirect.path, main.path, helper.path, indirect.path, libFile.path] }, + { projectName: tsconfigIndirect2.path, files: [tsconfigIndirect2.path, main.path, helper.path, indirect2.path, libFile.path] }, + { projectName: tsconfigSrcPath, files: [tsconfigSrcPath, main.path, helper.path, libFile.path] }, + ], + inferredProjects: emptyArray + }; + verifyDisableReferencedProjectLoad({ + configRefs: ["./tsconfig-indirect1.json", "./tsconfig-indirect2.json"], + additionalFiles: [tsconfigIndirect, indirect, tsconfigIndirect2, indirect2], + expectedOpenEvents: [ + ...expectedSolutionLoadAndTelemetry(), + ...expectedProjectReferenceLoadAndTelemetry(tsconfigIndirect.path), + ...expectedProjectReferenceLoadAndTelemetry(tsconfigIndirect2.path), + ...expectedProjectReferenceLoadAndTelemetry(tsconfigSrcPath), + configFileDiagEvent(main.path, tsconfigSrcPath, []) + ], + expectedDefaultProject: service => service.configuredProjects.get(tsconfigSrcPath)!, + expectedDefaultConfiguredProject: service => service.configuredProjects.get(tsconfigSrcPath)!, + expectedProjectsOnOpen, + expectedReloadEvents: [ + ...expectedReloadEvent(tsconfigPath), + ...expectedReloadEvent(tsconfigIndirect.path), + ...expectedReloadEvent(tsconfigSrcPath), + ...expectedReloadEvent(tsconfigIndirect2.path), + ] + }); + }); + + describe("when solution is project that contains its own files", () => { + it("when the project found is not solution but references open file through project reference", () => { + const ownMain: File = { + path: `${tscWatch.projectRoot}/own/main.ts`, + content: fileResolvingToMainDts.content + }; + const { refs, ...rest } = expectedReferencesResponse(); + verifySolutionScenario({ + solutionFiles: [`./own/main.ts`], + solutionOptions: { + outDir: "./target/", + baseUrl: "./src/" + }, + solutionProject: [tsconfigPath, ownMain.path, main.path, libFile.path, helper.path], + configRefs: ["./tsconfig-src.json"], + additionalFiles: [ownMain], + additionalProjects: emptyArray, + expectedOpenEvents: [ + ...expectedSolutionLoadAndTelemetry(), + ...expectedProjectReferenceLoadAndTelemetry(tsconfigSrcPath), + configFileDiagEvent(main.path, tsconfigSrcPath, []) + ], + expectedReloadEvents: [ + ...expectedReloadEvent(tsconfigPath), + ...expectedReloadEvent(tsconfigSrcPath), + ], + expectedReferences: { + refs: [ + ...refs, + ...expectedIndirectRefs(ownMain), + ], + ...rest + }, + expectedReferencesFromDtsProject: { + ...rest, + refs: [ + ...expectedIndirectRefs(fileResolvingToMainDts), + ...refs, + ...expectedIndirectRefs(ownMain), + ], + symbolDisplayString: "(alias) const foo: 1\nimport foo", + }, + }); + }); + + it("when project is indirectly referenced by solution", () => { + const ownMain: File = { + path: `${tscWatch.projectRoot}/own/main.ts`, + content: `import { bar } from 'main'; +bar;` + }; + const { tsconfigIndirect, indirect } = getIndirectProject("1"); + const { tsconfigIndirect: tsconfigIndirect2, indirect: indirect2 } = getIndirectProject("2"); + const { refs, ...rest } = expectedReferencesResponse(); + verifySolutionScenario({ + solutionFiles: [`./own/main.ts`], + solutionOptions: { + outDir: "./target/", + baseUrl: "./indirect1/" + }, + solutionProject: [tsconfigPath, indirect.path, ownMain.path, main.path, libFile.path, helper.path], + configRefs: ["./tsconfig-indirect1.json", "./tsconfig-indirect2.json"], + additionalFiles: [tsconfigIndirect, indirect, tsconfigIndirect2, indirect2, ownMain], + additionalProjects: [{ + projectName: tsconfigIndirect.path, + files: [tsconfigIndirect.path, main.path, helper.path, indirect.path, libFile.path] + }], + expectedOpenEvents: [ + ...expectedSolutionLoadAndTelemetry(), + ...expectedProjectReferenceLoadAndTelemetry(tsconfigIndirect.path), + ...expectedProjectReferenceLoadAndTelemetry(tsconfigSrcPath), + configFileDiagEvent(main.path, tsconfigSrcPath, []) + ], + expectedReloadEvents: [ + ...expectedReloadEvent(tsconfigPath), + ...expectedReloadEvent(tsconfigIndirect.path), + ...expectedReloadEvent(tsconfigSrcPath), + ], + expectedReferences: { + refs: [ + ...refs, + ...expectedIndirectRefs(indirect), + ...expectedIndirectRefs(indirect2), + ], + ...rest + }, + expectedReferencesFromDtsProject: { + ...rest, + refs: [ + ...expectedIndirectRefs(fileResolvingToMainDts), + ...refs, + ...expectedIndirectRefs(indirect2), + ...expectedIndirectRefs(indirect), + ], + symbolDisplayString: "(alias) const foo: 1\nimport foo", + } + }); + }); + + it("disables looking into the child project if disableReferencedProjectLoad is set", () => { + const ownMain: File = { + path: `${tscWatch.projectRoot}/own/main.ts`, + content: fileResolvingToMainDts.content + }; + const expectedProjectsOnOpen: VerifyProjects = { + configuredProjects: [ + { projectName: tsconfigPath, files: [tsconfigPath, ownMain.path, main.path, libFile.path, helper.path] }, + ], + inferredProjects: emptyArray + }; + verifyDisableReferencedProjectLoad({ + solutionFiles: [`./own/main.ts`], + solutionOptions: { + outDir: "./target/", + baseUrl: "./src/", + disableReferencedProjectLoad: true + }, + configRefs: ["./tsconfig-src.json"], + additionalFiles: [ownMain], + expectedOpenEvents: [ + ...expectedSolutionLoadAndTelemetry(), + configFileDiagEvent(main.path, tsconfigPath, []) + ], + expectedDefaultProject: service => service.configuredProjects.get(tsconfigPath)!, + expectedDefaultConfiguredProject: returnUndefined, + expectedProjectsOnOpen, + expectedReloadEvents: expectedReloadEvent(tsconfigPath) + }); + }); + + it("disables looking into the child project if disableReferencedProjectLoad is set in indirect project", () => { + const ownMain: File = { + path: `${tscWatch.projectRoot}/own/main.ts`, + content: `import { bar } from 'main'; +bar;` + }; + const { tsconfigIndirect, indirect } = getIndirectProject("1", { disableReferencedProjectLoad: true }); + const expectedProjectsOnOpen: VerifyProjects = { + configuredProjects: [ + { projectName: tsconfigPath, files: [tsconfigPath, indirect.path, ownMain.path, main.path, libFile.path, helper.path] }, + { projectName: tsconfigIndirect.path, files: [tsconfigIndirect.path, main.path, helper.path, indirect.path, libFile.path] }, + ], + inferredProjects: emptyArray + }; + verifyDisableReferencedProjectLoad({ + solutionFiles: [`./own/main.ts`], + solutionOptions: { + outDir: "./target/", + baseUrl: "./indirect1/", + }, + configRefs: ["./tsconfig-indirect1.json"], + additionalFiles: [tsconfigIndirect, indirect, ownMain], + expectedOpenEvents: [ + ...expectedSolutionLoadAndTelemetry(), + ...expectedProjectReferenceLoadAndTelemetry(tsconfigIndirect.path), + configFileDiagEvent(main.path, tsconfigPath, []) + ], + expectedDefaultProject: service => service.configuredProjects.get(tsconfigPath)!, + expectedDefaultConfiguredProject: returnUndefined, + expectedProjectsOnOpen, + expectedReloadEvents: [ + ...expectedReloadEvent(tsconfigPath), + ...expectedReloadEvent(tsconfigIndirect.path), + ] + }); + }); + + it("disables looking into the child project if disableReferencedProjectLoad is set in first indirect project but not in another one", () => { + const ownMain: File = { + path: `${tscWatch.projectRoot}/own/main.ts`, + content: `import { bar } from 'main'; +bar;` + }; + const { tsconfigIndirect, indirect } = getIndirectProject("1", { disableReferencedProjectLoad: true }); + const { tsconfigIndirect: tsconfigIndirect2, indirect: indirect2 } = getIndirectProject("2"); + const expectedProjectsOnOpen: VerifyProjects = { + configuredProjects: [ + { projectName: tsconfigPath, files: [tsconfigPath, indirect.path, ownMain.path, main.path, libFile.path, helper.path] }, + { projectName: tsconfigIndirect.path, files: [tsconfigIndirect.path, main.path, helper.path, indirect.path, libFile.path] }, + { projectName: tsconfigIndirect2.path, files: [tsconfigIndirect2.path, main.path, helper.path, indirect2.path, libFile.path] }, + { projectName: tsconfigSrcPath, files: [tsconfigSrcPath, main.path, helper.path, libFile.path] }, + ], + inferredProjects: emptyArray + }; + verifyDisableReferencedProjectLoad({ + solutionFiles: [`./own/main.ts`], + solutionOptions: { + outDir: "./target/", + baseUrl: "./indirect1/", + }, + configRefs: ["./tsconfig-indirect1.json", "./tsconfig-indirect2.json"], + additionalFiles: [tsconfigIndirect, indirect, tsconfigIndirect2, indirect2, ownMain], + expectedOpenEvents: [ + ...expectedSolutionLoadAndTelemetry(), + ...expectedProjectReferenceLoadAndTelemetry(tsconfigIndirect.path), + ...expectedProjectReferenceLoadAndTelemetry(tsconfigIndirect2.path), + ...expectedProjectReferenceLoadAndTelemetry(tsconfigSrcPath), + configFileDiagEvent(main.path, tsconfigSrcPath, []) + ], + expectedDefaultProject: service => service.configuredProjects.get(tsconfigSrcPath)!, + expectedDefaultConfiguredProject: service => service.configuredProjects.get(tsconfigSrcPath)!, + expectedProjectsOnOpen, + expectedReloadEvents: [ + ...expectedReloadEvent(tsconfigPath), + ...expectedReloadEvent(tsconfigIndirect.path), + ...expectedReloadEvent(tsconfigSrcPath), + ...expectedReloadEvent(tsconfigIndirect2.path), + ] + }); + }); + }); }); describe("auto import with referenced project", () => { diff --git a/src/testRunner/unittests/tsserver/syntacticServer.ts b/src/testRunner/unittests/tsserver/syntacticServer.ts new file mode 100644 index 00000000000..6fcc4ba9b5f --- /dev/null +++ b/src/testRunner/unittests/tsserver/syntacticServer.ts @@ -0,0 +1,187 @@ +namespace ts.projectSystem { + describe("unittests:: tsserver:: Semantic operations on Syntax server", () => { + function setup() { + const file1: File = { + path: `${tscWatch.projectRoot}/a.ts`, + content: `import { y, cc } from "./b"; +import { something } from "something"; +class c { prop = "hello"; foo() { return this.prop; } }` + }; + const file2: File = { + path: `${tscWatch.projectRoot}/b.ts`, + content: `export { cc } from "./c"; +import { something } from "something"; + export const y = 10;` + }; + const file3: File = { + path: `${tscWatch.projectRoot}/c.ts`, + content: `export const cc = 10;` + }; + const something: File = { + path: `${tscWatch.projectRoot}/node_modules/something/index.d.ts`, + content: "export const something = 10;" + }; + const configFile: File = { + path: `${tscWatch.projectRoot}/tsconfig.json`, + content: "{}" + }; + const host = createServerHost([file1, file2, file3, something, libFile, configFile]); + const session = createSession(host, { syntaxOnly: true, useSingleInferredProject: true }); + return { host, session, file1, file2, file3, something, configFile }; + } + + function verifySessionException(session: TestSession, request: Partial) { + let hasException = false; + try { + session.executeCommandSeq(request); + } + catch (e) { + assert.equal(e.message, `Request: ${request.command} not allowed in LanguageServiceMode.Syntactic`); + hasException = true; + } + assert.isTrue(hasException); + } + + it("open files are added to inferred project even if config file is present and semantic operations fail", () => { + const { host, session, file1, file2, file3, something } = setup(); + const service = session.getProjectService(); + openFilesForSession([file1], session); + checkNumberOfProjects(service, { inferredProjects: 1 }); + const project = service.inferredProjects[0]; + checkProjectActualFiles(project, emptyArray); + verifyCompletions(); + verifyGoToDefToB(); + + openFilesForSession([file2], session); + checkNumberOfProjects(service, { inferredProjects: 1 }); + checkProjectActualFiles(project, emptyArray); + verifyCompletions(); + verifyGoToDefToB(); + verifyGoToDefToC(); + + openFilesForSession([file3], session); + checkNumberOfProjects(service, { inferredProjects: 1 }); + checkProjectActualFiles(project, emptyArray); + + openFilesForSession([something], session); + checkNumberOfProjects(service, { inferredProjects: 1 }); + checkProjectActualFiles(project, emptyArray); + + // Close open files and verify resolutions + closeFilesForSession([file3], session); + checkNumberOfProjects(service, { inferredProjects: 1 }); + checkProjectActualFiles(project, emptyArray); + + closeFilesForSession([file2], session); + checkNumberOfProjects(service, { inferredProjects: 1 }); + checkProjectActualFiles(project, emptyArray); + + function verifyCompletions() { + assert.isFalse(project.languageServiceEnabled); + checkWatchedFiles(host, emptyArray); + checkWatchedDirectories(host, emptyArray, /*recursive*/ true); + checkWatchedDirectories(host, emptyArray, /*recursive*/ false); + verifySessionException(session, { + command: protocol.CommandTypes.Completions, + arguments: protocolFileLocationFromSubstring(file1, "prop", { index: 1 }) + }); + } + + function verifyGoToDefToB() { + verifySessionException(session, { + command: protocol.CommandTypes.DefinitionAndBoundSpan, + arguments: protocolFileLocationFromSubstring(file1, "y") + }); + } + + function verifyGoToDefToC() { + verifySessionException(session, { + command: protocol.CommandTypes.DefinitionAndBoundSpan, + arguments: protocolFileLocationFromSubstring(file1, "cc") + }); + } + }); + + it("throws on unsupported commands", () => { + const { session, file1 } = setup(); + const service = session.getProjectService(); + openFilesForSession([file1], session); + verifySessionException(session, { + type: "request", + seq: 1, + command: protocol.CommandTypes.SemanticDiagnosticsSync, + arguments: { file: file1.path } + }); + + let hasException = false; + const project = service.inferredProjects[0]; + try { + project.getLanguageService().getSemanticDiagnostics(file1.path); + } + catch (e) { + assert.equal(e.message, `LanguageService Operation: getSemanticDiagnostics not allowed in LanguageServiceMode.Syntactic`); + hasException = true; + } + assert.isTrue(hasException); + }); + + it("should not include auto type reference directives", () => { + const { host, session, file1 } = setup(); + const atTypes: File = { + path: `/node_modules/@types/somemodule/index.d.ts`, + content: "export const something = 10;" + }; + host.ensureFileOrFolder(atTypes); + const service = session.getProjectService(); + openFilesForSession([file1], session); + checkNumberOfProjects(service, { inferredProjects: 1 }); + const project = service.inferredProjects[0]; + checkProjectActualFiles(project, emptyArray); // Should not contain atTypes + }); + + it("should not include referenced files from unopened files", () => { + const file1: File = { + path: `${tscWatch.projectRoot}/a.ts`, + content: `/// +/// +function fooA() { }` + }; + const file2: File = { + path: `${tscWatch.projectRoot}/b.ts`, + content: `/// +/// +function fooB() { }` + }; + const file3: File = { + path: `${tscWatch.projectRoot}/c.ts`, + content: `function fooC() { }` + }; + const something: File = { + path: `${tscWatch.projectRoot}/node_modules/something/index.d.ts`, + content: "function something() {}" + }; + const configFile: File = { + path: `${tscWatch.projectRoot}/tsconfig.json`, + content: "{}" + }; + const host = createServerHost([file1, file2, file3, something, libFile, configFile]); + const session = createSession(host, { syntaxOnly: true, useSingleInferredProject: true }); + const service = session.getProjectService(); + openFilesForSession([file1], session); + checkNumberOfProjects(service, { inferredProjects: 1 }); + const project = service.inferredProjects[0]; + checkProjectActualFiles(project, emptyArray); + + openFilesForSession([file2], session); + checkNumberOfProjects(service, { inferredProjects: 1 }); + assert.isFalse(project.dirty); + project.updateGraph(); + checkProjectActualFiles(project, emptyArray); + + closeFilesForSession([file2], session); + checkNumberOfProjects(service, { inferredProjects: 1 }); + assert.isTrue(project.dirty); + checkProjectActualFiles(project, emptyArray); + }); + }); +} diff --git a/src/testRunner/unittests/tsserver/typingsInstaller.ts b/src/testRunner/unittests/tsserver/typingsInstaller.ts index 1ca1ce143a7..e9c77566b70 100644 --- a/src/testRunner/unittests/tsserver/typingsInstaller.ts +++ b/src/testRunner/unittests/tsserver/typingsInstaller.ts @@ -130,7 +130,7 @@ namespace ts.projectSystem { })(); const projectService = createProjectService(host, { useSingleInferredProject: true, typingsInstaller: installer }); - projectService.setHostConfiguration({ preferences: { includePackageJsonAutoImports: "none" } }); + projectService.setHostConfiguration({ preferences: { includePackageJsonAutoImports: "off" } }); projectService.openClientFile(file1.path); checkNumberOfProjects(projectService, { configuredProjects: 1 }); diff --git a/src/tsconfig-base.json b/src/tsconfig-base.json index c1081ed1826..b0515e0a023 100644 --- a/src/tsconfig-base.json +++ b/src/tsconfig-base.json @@ -3,6 +3,7 @@ "pretty": true, "lib": ["es2015.iterable", "es2015.generator", "es5"], "target": "es5", + "moduleResolution": "classic", "rootDir": ".", "declaration": true, diff --git a/src/tsserver/server.ts b/src/tsserver/server.ts index da0d9be9ddb..3f6ba6b2a17 100644 --- a/src/tsserver/server.ts +++ b/src/tsserver/server.ts @@ -516,6 +516,7 @@ namespace ts.server { canUseEvents: true, suppressDiagnosticEvents, syntaxOnly, + serverMode, noGetErrOnBackgroundUpdate, globalPlugins, pluginProbeLocations, @@ -948,6 +949,26 @@ namespace ts.server { return arg.split(",").filter(name => name !== ""); } + let unknownServerMode: string | undefined; + function parseServerMode(): LanguageServiceMode | undefined { + const mode = findArgument("--serverMode"); + if (mode === undefined) { + return undefined; + } + + switch (mode.toLowerCase()) { + case "semantic": + return LanguageServiceMode.Semantic; + case "partialsemantic": + return LanguageServiceMode.PartialSemantic; + case "syntactic": + return LanguageServiceMode.Syntactic; + default: + unknownServerMode = mode; + return undefined; + } + } + const globalPlugins = parseStringArray("--globalPlugins"); const pluginProbeLocations = parseStringArray("--pluginProbeLocations"); const allowLocalPluginLoads = hasArgument("--allowLocalPluginLoads"); @@ -957,6 +978,7 @@ namespace ts.server { const disableAutomaticTypingAcquisition = hasArgument("--disableAutomaticTypingAcquisition"); const suppressDiagnosticEvents = hasArgument("--suppressDiagnosticEvents"); const syntaxOnly = hasArgument("--syntaxOnly"); + const serverMode = parseServerMode(); const telemetryEnabled = hasArgument(Arguments.EnableTelemetry); const noGetErrOnBackgroundUpdate = hasArgument("--noGetErrOnBackgroundUpdate"); @@ -964,6 +986,7 @@ namespace ts.server { logger.info(`Version: ${version}`); logger.info(`Arguments: ${process.argv.join(" ")}`); logger.info(`Platform: ${os.platform()} NodeVersion: ${nodeVersion} CaseSensitive: ${sys.useCaseSensitiveFileNames}`); + logger.info(`ServerMode: ${serverMode} syntaxOnly: ${syntaxOnly} hasUnknownServerMode: ${unknownServerMode}`); const ioSession = new IOSession(); process.on("uncaughtException", err => { diff --git a/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.@link tags.json b/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.@link tags.json index 0d3b49aafba..1e0ef5dff87 100644 --- a/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.@link tags.json +++ b/tests/baselines/reference/JSDocParsing/DocComments.parsesCorrectly.@link tags.json @@ -1,32 +1,9 @@ { "kind": "JSDocComment", "pos": 0, - "end": 127, + "end": 63, "flags": "JSDoc", "modifierFlagsCache": 0, "transformFlags": 0, - "comment": "{@link first link}\nInside {@link link text} thing", - "tags": { - "0": { - "kind": "JSDocTag", - "pos": 63, - "end": 68, - "modifierFlagsCache": 0, - "transformFlags": 0, - "tagName": { - "kind": "Identifier", - "pos": 64, - "end": 67, - "modifierFlagsCache": 0, - "transformFlags": 0, - "escapedText": "see" - }, - "comment": "{@link second link text} and {@link Foo|a foo} as well." - }, - "length": 1, - "pos": 63, - "end": 68, - "hasTrailingComma": false, - "transformFlags": 0 - } + "comment": "{@link first link}\nInside {@link link text} thing" } \ No newline at end of file diff --git a/tests/baselines/reference/aliasUsedAsNameValue.js b/tests/baselines/reference/aliasUsedAsNameValue.js index 84489f6eff3..82ff8fc411c 100644 --- a/tests/baselines/reference/aliasUsedAsNameValue.js +++ b/tests/baselines/reference/aliasUsedAsNameValue.js @@ -36,7 +36,8 @@ exports.a = void 0; /// var mod = require("./aliasUsedAsNameValue_0"); var b = require("./aliasUsedAsNameValue_1"); -exports.a = function () { +var a = function () { //var x = mod.id; // TODO needed hack that mod is loaded b.b(mod); }; +exports.a = a; diff --git a/tests/baselines/reference/aliasesInSystemModule1.errors.txt b/tests/baselines/reference/aliasesInSystemModule1.errors.txt index 0d04ec6203d..5b3be2a6056 100644 --- a/tests/baselines/reference/aliasesInSystemModule1.errors.txt +++ b/tests/baselines/reference/aliasesInSystemModule1.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/aliasesInSystemModule1.ts(1,24): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +tests/cases/compiler/aliasesInSystemModule1.ts(1,24): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/aliasesInSystemModule1.ts (1 errors) ==== import alias = require('foo'); ~~~~~ -!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import cls = alias.Class; export import cls2 = alias.Class; diff --git a/tests/baselines/reference/aliasesInSystemModule2.errors.txt b/tests/baselines/reference/aliasesInSystemModule2.errors.txt index d1ba8a1df83..f4c7842ad11 100644 --- a/tests/baselines/reference/aliasesInSystemModule2.errors.txt +++ b/tests/baselines/reference/aliasesInSystemModule2.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/aliasesInSystemModule2.ts(1,21): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +tests/cases/compiler/aliasesInSystemModule2.ts(1,21): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/aliasesInSystemModule2.ts (1 errors) ==== import {alias} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import cls = alias.Class; export import cls2 = alias.Class; diff --git a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt index bd0137ffa34..d1436b4af0f 100644 --- a/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt +++ b/tests/baselines/reference/ambientExternalModuleInAnotherExternalModule.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(4,16): error TS2664: Invalid module name in augmentation, module 'ext' cannot be found. -tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(9,22): error TS2307: Cannot find module 'ext' or its corresponding type declarations. +tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(9,22): error TS2792: Cannot find module 'ext'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts (2 errors) ==== @@ -15,5 +15,5 @@ tests/cases/compiler/ambientExternalModuleInAnotherExternalModule.ts(9,22): erro // Cannot resolve this ext module reference import ext = require("ext"); ~~~~~ -!!! error TS2307: Cannot find module 'ext' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'ext'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? var x = ext; \ No newline at end of file diff --git a/tests/baselines/reference/ambientRequireFunction.symbols b/tests/baselines/reference/ambientRequireFunction.symbols index b2e94e89a2c..3fb2c754805 100644 --- a/tests/baselines/reference/ambientRequireFunction.symbols +++ b/tests/baselines/reference/ambientRequireFunction.symbols @@ -4,13 +4,13 @@ const fs = require("fs"); >fs : Symbol(fs, Decl(app.js, 2, 5)) >require : Symbol(require, Decl(node.d.ts, 0, 0)) ->"fs" : Symbol("fs", Decl(node.d.ts, 0, 50)) +>"fs" : Symbol(fs, Decl(node.d.ts, 0, 50)) const text = fs.readFileSync("/a/b/c"); >text : Symbol(text, Decl(app.js, 3, 5)) ->fs.readFileSync : Symbol(readFileSync, Decl(node.d.ts, 2, 21)) +>fs.readFileSync : Symbol(fs.readFileSync, Decl(node.d.ts, 2, 21)) >fs : Symbol(fs, Decl(app.js, 2, 5)) ->readFileSync : Symbol(readFileSync, Decl(node.d.ts, 2, 21)) +>readFileSync : Symbol(fs.readFileSync, Decl(node.d.ts, 2, 21)) === tests/cases/compiler/node.d.ts === declare function require(moduleName: string): any; diff --git a/tests/baselines/reference/ambientRequireFunction.types b/tests/baselines/reference/ambientRequireFunction.types index d8d47964cfd..487305a139a 100644 --- a/tests/baselines/reference/ambientRequireFunction.types +++ b/tests/baselines/reference/ambientRequireFunction.types @@ -2,8 +2,8 @@ /// const fs = require("fs"); ->fs : typeof import("fs") ->require("fs") : typeof import("fs") +>fs : typeof fs +>require("fs") : typeof fs >require : (moduleName: string) => any >"fs" : "fs" @@ -11,7 +11,7 @@ const text = fs.readFileSync("/a/b/c"); >text : string >fs.readFileSync("/a/b/c") : string >fs.readFileSync : (s: string) => string ->fs : typeof import("fs") +>fs : typeof fs >readFileSync : (s: string) => string >"/a/b/c" : "/a/b/c" diff --git a/tests/baselines/reference/amdDependencyComment2.errors.txt b/tests/baselines/reference/amdDependencyComment2.errors.txt index 5f194cc081d..2d8d8b125ca 100644 --- a/tests/baselines/reference/amdDependencyComment2.errors.txt +++ b/tests/baselines/reference/amdDependencyComment2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. +tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/amdDependencyComment2.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyComment2.ts(3,21): error TS2307: Cannot find m import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyCommentName2.errors.txt b/tests/baselines/reference/amdDependencyCommentName2.errors.txt index 935e839abbb..af8fbee9a1d 100644 --- a/tests/baselines/reference/amdDependencyCommentName2.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. +tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/amdDependencyCommentName2.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/amdDependencyCommentName2.ts(3,21): error TS2307: Cannot fi import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyCommentName3.errors.txt b/tests/baselines/reference/amdDependencyCommentName3.errors.txt index 1da4d3c358a..612e41c21e6 100644 --- a/tests/baselines/reference/amdDependencyCommentName3.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2307: Cannot find module 'm2' or its corresponding type declarations. +tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/amdDependencyCommentName3.ts (1 errors) ==== @@ -8,5 +8,5 @@ tests/cases/compiler/amdDependencyCommentName3.ts(5,21): error TS2307: Cannot fi import m1 = require("m2") ~~~~ -!!! error TS2307: Cannot find module 'm2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'm2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? m1.f(); \ No newline at end of file diff --git a/tests/baselines/reference/amdDependencyCommentName4.errors.txt b/tests/baselines/reference/amdDependencyCommentName4.errors.txt index fb666eb7119..75e1cdfc985 100644 --- a/tests/baselines/reference/amdDependencyCommentName4.errors.txt +++ b/tests/baselines/reference/amdDependencyCommentName4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/amdDependencyCommentName4.ts(8,21): error TS2307: Cannot find module 'aliasedModule1' or its corresponding type declarations. -tests/cases/compiler/amdDependencyCommentName4.ts(11,26): error TS2307: Cannot find module 'aliasedModule2' or its corresponding type declarations. -tests/cases/compiler/amdDependencyCommentName4.ts(14,15): error TS2307: Cannot find module 'aliasedModule3' or its corresponding type declarations. -tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2307: Cannot find module 'aliasedModule4' or its corresponding type declarations. +tests/cases/compiler/amdDependencyCommentName4.ts(8,21): error TS2792: Cannot find module 'aliasedModule1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/amdDependencyCommentName4.ts(11,26): error TS2792: Cannot find module 'aliasedModule2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/amdDependencyCommentName4.ts(14,15): error TS2792: Cannot find module 'aliasedModule3'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2792: Cannot find module 'aliasedModule4'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/amdDependencyCommentName4.ts (4 errors) ==== @@ -14,22 +14,22 @@ tests/cases/compiler/amdDependencyCommentName4.ts(17,21): error TS2307: Cannot f import r1 = require("aliasedModule1"); ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'aliasedModule1' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'aliasedModule1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? r1; import {p1, p2, p3} from "aliasedModule2"; ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'aliasedModule2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'aliasedModule2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? p1; import d from "aliasedModule3"; ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'aliasedModule3' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'aliasedModule3'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? d; import * as ns from "aliasedModule4"; ~~~~~~~~~~~~~~~~ -!!! error TS2307: Cannot find module 'aliasedModule4' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'aliasedModule4'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ns; import "unaliasedModule2"; \ No newline at end of file diff --git a/tests/baselines/reference/anonymousModules.errors.txt b/tests/baselines/reference/anonymousModules.errors.txt index b81513cfbbd..b14520a8c1c 100644 --- a/tests/baselines/reference/anonymousModules.errors.txt +++ b/tests/baselines/reference/anonymousModules.errors.txt @@ -1,22 +1,22 @@ -tests/cases/compiler/anonymousModules.ts(1,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`. +tests/cases/compiler/anonymousModules.ts(1,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. tests/cases/compiler/anonymousModules.ts(1,8): error TS1005: ';' expected. -tests/cases/compiler/anonymousModules.ts(4,2): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`. +tests/cases/compiler/anonymousModules.ts(4,2): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. tests/cases/compiler/anonymousModules.ts(4,9): error TS1005: ';' expected. -tests/cases/compiler/anonymousModules.ts(10,2): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`. +tests/cases/compiler/anonymousModules.ts(10,2): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. tests/cases/compiler/anonymousModules.ts(10,9): error TS1005: ';' expected. ==== tests/cases/compiler/anonymousModules.ts (6 errors) ==== module { ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`. +!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ~ !!! error TS1005: ';' expected. export var foo = 1; module { ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`. +!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ~ !!! error TS1005: ';' expected. export var bar = 1; @@ -26,7 +26,7 @@ tests/cases/compiler/anonymousModules.ts(10,9): error TS1005: ';' expected. module { ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`. +!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ~ !!! error TS1005: ';' expected. var x = bar; diff --git a/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.js b/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.js new file mode 100644 index 00000000000..2d33681feda --- /dev/null +++ b/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.js @@ -0,0 +1,54 @@ +//// [anyAndUnknownHaveFalsyComponents.ts] +declare let x1: any; +const y1 = x1 && 3; + +// #39113 +declare let isTreeHeader1: any; +function foo1() { + return { + display: "block", + ...(isTreeHeader1 && { + display: "flex", + }) + }; +} + +declare let x2: unknown; +const y2 = x2 && 3; + +// #39113 +declare let isTreeHeader2: unknown; +function foo2() { + return { + display: "block", + ...(isTreeHeader1 && { + display: "flex", + }) + }; +} + + +//// [anyAndUnknownHaveFalsyComponents.js] +var __assign = (this && this.__assign) || function () { + __assign = Object.assign || function(t) { + for (var s, i = 1, n = arguments.length; i < n; i++) { + s = arguments[i]; + for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p)) + t[p] = s[p]; + } + return t; + }; + return __assign.apply(this, arguments); +}; +var y1 = x1 && 3; +function foo1() { + return __assign({ display: "block" }, (isTreeHeader1 && { + display: "flex" + })); +} +var y2 = x2 && 3; +function foo2() { + return __assign({ display: "block" }, (isTreeHeader1 && { + display: "flex" + })); +} diff --git a/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.symbols b/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.symbols new file mode 100644 index 00000000000..862e3d14550 --- /dev/null +++ b/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.symbols @@ -0,0 +1,57 @@ +=== tests/cases/compiler/anyAndUnknownHaveFalsyComponents.ts === +declare let x1: any; +>x1 : Symbol(x1, Decl(anyAndUnknownHaveFalsyComponents.ts, 0, 11)) + +const y1 = x1 && 3; +>y1 : Symbol(y1, Decl(anyAndUnknownHaveFalsyComponents.ts, 1, 5)) +>x1 : Symbol(x1, Decl(anyAndUnknownHaveFalsyComponents.ts, 0, 11)) + +// #39113 +declare let isTreeHeader1: any; +>isTreeHeader1 : Symbol(isTreeHeader1, Decl(anyAndUnknownHaveFalsyComponents.ts, 4, 11)) + +function foo1() { +>foo1 : Symbol(foo1, Decl(anyAndUnknownHaveFalsyComponents.ts, 4, 31)) + + return { + display: "block", +>display : Symbol(display, Decl(anyAndUnknownHaveFalsyComponents.ts, 6, 10)) + + ...(isTreeHeader1 && { +>isTreeHeader1 : Symbol(isTreeHeader1, Decl(anyAndUnknownHaveFalsyComponents.ts, 4, 11)) + + display: "flex", +>display : Symbol(display, Decl(anyAndUnknownHaveFalsyComponents.ts, 8, 26)) + + }) + }; +} + +declare let x2: unknown; +>x2 : Symbol(x2, Decl(anyAndUnknownHaveFalsyComponents.ts, 14, 11)) + +const y2 = x2 && 3; +>y2 : Symbol(y2, Decl(anyAndUnknownHaveFalsyComponents.ts, 15, 5)) +>x2 : Symbol(x2, Decl(anyAndUnknownHaveFalsyComponents.ts, 14, 11)) + +// #39113 +declare let isTreeHeader2: unknown; +>isTreeHeader2 : Symbol(isTreeHeader2, Decl(anyAndUnknownHaveFalsyComponents.ts, 18, 11)) + +function foo2() { +>foo2 : Symbol(foo2, Decl(anyAndUnknownHaveFalsyComponents.ts, 18, 35)) + + return { + display: "block", +>display : Symbol(display, Decl(anyAndUnknownHaveFalsyComponents.ts, 20, 10)) + + ...(isTreeHeader1 && { +>isTreeHeader1 : Symbol(isTreeHeader1, Decl(anyAndUnknownHaveFalsyComponents.ts, 4, 11)) + + display: "flex", +>display : Symbol(display, Decl(anyAndUnknownHaveFalsyComponents.ts, 22, 26)) + + }) + }; +} + diff --git a/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.types b/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.types new file mode 100644 index 00000000000..34757366c35 --- /dev/null +++ b/tests/baselines/reference/anyAndUnknownHaveFalsyComponents.types @@ -0,0 +1,75 @@ +=== tests/cases/compiler/anyAndUnknownHaveFalsyComponents.ts === +declare let x1: any; +>x1 : any + +const y1 = x1 && 3; +>y1 : any +>x1 && 3 : any +>x1 : any +>3 : 3 + +// #39113 +declare let isTreeHeader1: any; +>isTreeHeader1 : any + +function foo1() { +>foo1 : () => any + + return { +>{ display: "block", ...(isTreeHeader1 && { display: "flex", }) } : any + + display: "block", +>display : string +>"block" : "block" + + ...(isTreeHeader1 && { +>(isTreeHeader1 && { display: "flex", }) : any +>isTreeHeader1 && { display: "flex", } : any +>isTreeHeader1 : any +>{ display: "flex", } : { display: string; } + + display: "flex", +>display : string +>"flex" : "flex" + + }) + }; +} + +declare let x2: unknown; +>x2 : unknown + +const y2 = x2 && 3; +>y2 : unknown +>x2 && 3 : unknown +>x2 : unknown +>3 : 3 + +// #39113 +declare let isTreeHeader2: unknown; +>isTreeHeader2 : unknown + +function foo2() { +>foo2 : () => any + + return { +>{ display: "block", ...(isTreeHeader1 && { display: "flex", }) } : any + + display: "block", +>display : string +>"block" : "block" + + ...(isTreeHeader1 && { +>(isTreeHeader1 && { display: "flex", }) : any +>isTreeHeader1 && { display: "flex", } : any +>isTreeHeader1 : any +>{ display: "flex", } : { display: string; } + + display: "flex", +>display : string +>"flex" : "flex" + + }) + }; +} + diff --git a/tests/baselines/reference/api/tsserverlibrary.d.ts b/tests/baselines/reference/api/tsserverlibrary.d.ts index 8442b93e4f6..15653ecacf2 100644 --- a/tests/baselines/reference/api/tsserverlibrary.d.ts +++ b/tests/baselines/reference/api/tsserverlibrary.d.ts @@ -14,7 +14,7 @@ and limitations under the License. ***************************************************************************** */ declare namespace ts { - const versionMajorMinor = "4.0"; + const versionMajorMinor = "4.1"; /** The version of the TypeScript compiler release */ const version: string; /** @@ -240,207 +240,212 @@ declare namespace ts { DeclareKeyword = 133, GetKeyword = 134, InferKeyword = 135, - IsKeyword = 136, - KeyOfKeyword = 137, - ModuleKeyword = 138, - NamespaceKeyword = 139, - NeverKeyword = 140, - ReadonlyKeyword = 141, - RequireKeyword = 142, - NumberKeyword = 143, - ObjectKeyword = 144, - SetKeyword = 145, - StringKeyword = 146, - SymbolKeyword = 147, - TypeKeyword = 148, - UndefinedKeyword = 149, - UniqueKeyword = 150, - UnknownKeyword = 151, - FromKeyword = 152, - GlobalKeyword = 153, - BigIntKeyword = 154, - OfKeyword = 155, - QualifiedName = 156, - ComputedPropertyName = 157, - TypeParameter = 158, - Parameter = 159, - Decorator = 160, - PropertySignature = 161, - PropertyDeclaration = 162, - MethodSignature = 163, - MethodDeclaration = 164, - Constructor = 165, - GetAccessor = 166, - SetAccessor = 167, - CallSignature = 168, - ConstructSignature = 169, - IndexSignature = 170, - TypePredicate = 171, - TypeReference = 172, - FunctionType = 173, - ConstructorType = 174, - TypeQuery = 175, - TypeLiteral = 176, - ArrayType = 177, - TupleType = 178, - OptionalType = 179, - RestType = 180, - UnionType = 181, - IntersectionType = 182, - ConditionalType = 183, - InferType = 184, - ParenthesizedType = 185, - ThisType = 186, - TypeOperator = 187, - IndexedAccessType = 188, - MappedType = 189, - LiteralType = 190, - NamedTupleMember = 191, - ImportType = 192, - ObjectBindingPattern = 193, - ArrayBindingPattern = 194, - BindingElement = 195, - ArrayLiteralExpression = 196, - ObjectLiteralExpression = 197, - PropertyAccessExpression = 198, - ElementAccessExpression = 199, - CallExpression = 200, - NewExpression = 201, - TaggedTemplateExpression = 202, - TypeAssertionExpression = 203, - ParenthesizedExpression = 204, - FunctionExpression = 205, - ArrowFunction = 206, - DeleteExpression = 207, - TypeOfExpression = 208, - VoidExpression = 209, - AwaitExpression = 210, - PrefixUnaryExpression = 211, - PostfixUnaryExpression = 212, - BinaryExpression = 213, - ConditionalExpression = 214, - TemplateExpression = 215, - YieldExpression = 216, - SpreadElement = 217, - ClassExpression = 218, - OmittedExpression = 219, - ExpressionWithTypeArguments = 220, - AsExpression = 221, - NonNullExpression = 222, - MetaProperty = 223, - SyntheticExpression = 224, - TemplateSpan = 225, - SemicolonClassElement = 226, - Block = 227, - EmptyStatement = 228, - VariableStatement = 229, - ExpressionStatement = 230, - IfStatement = 231, - DoStatement = 232, - WhileStatement = 233, - ForStatement = 234, - ForInStatement = 235, - ForOfStatement = 236, - ContinueStatement = 237, - BreakStatement = 238, - ReturnStatement = 239, - WithStatement = 240, - SwitchStatement = 241, - LabeledStatement = 242, - ThrowStatement = 243, - TryStatement = 244, - DebuggerStatement = 245, - VariableDeclaration = 246, - VariableDeclarationList = 247, - FunctionDeclaration = 248, - ClassDeclaration = 249, - InterfaceDeclaration = 250, - TypeAliasDeclaration = 251, - EnumDeclaration = 252, - ModuleDeclaration = 253, - ModuleBlock = 254, - CaseBlock = 255, - NamespaceExportDeclaration = 256, - ImportEqualsDeclaration = 257, - ImportDeclaration = 258, - ImportClause = 259, - NamespaceImport = 260, - NamedImports = 261, - ImportSpecifier = 262, - ExportAssignment = 263, - ExportDeclaration = 264, - NamedExports = 265, - NamespaceExport = 266, - ExportSpecifier = 267, - MissingDeclaration = 268, - ExternalModuleReference = 269, - JsxElement = 270, - JsxSelfClosingElement = 271, - JsxOpeningElement = 272, - JsxClosingElement = 273, - JsxFragment = 274, - JsxOpeningFragment = 275, - JsxClosingFragment = 276, - JsxAttribute = 277, - JsxAttributes = 278, - JsxSpreadAttribute = 279, - JsxExpression = 280, - CaseClause = 281, - DefaultClause = 282, - HeritageClause = 283, - CatchClause = 284, - PropertyAssignment = 285, - ShorthandPropertyAssignment = 286, - SpreadAssignment = 287, - EnumMember = 288, - UnparsedPrologue = 289, - UnparsedPrepend = 290, - UnparsedText = 291, - UnparsedInternalText = 292, - UnparsedSyntheticReference = 293, - SourceFile = 294, - Bundle = 295, - UnparsedSource = 296, - InputFiles = 297, - JSDocTypeExpression = 298, - JSDocAllType = 299, - JSDocUnknownType = 300, - JSDocNullableType = 301, - JSDocNonNullableType = 302, - JSDocOptionalType = 303, - JSDocFunctionType = 304, - JSDocVariadicType = 305, - JSDocNamepathType = 306, - JSDocComment = 307, - JSDocTypeLiteral = 308, - JSDocSignature = 309, - JSDocTag = 310, - JSDocAugmentsTag = 311, - JSDocImplementsTag = 312, - JSDocAuthorTag = 313, - JSDocDeprecatedTag = 314, - JSDocClassTag = 315, - JSDocPublicTag = 316, - JSDocPrivateTag = 317, - JSDocProtectedTag = 318, - JSDocReadonlyTag = 319, - JSDocCallbackTag = 320, - JSDocEnumTag = 321, - JSDocParameterTag = 322, - JSDocReturnTag = 323, - JSDocThisTag = 324, - JSDocTypeTag = 325, - JSDocTemplateTag = 326, - JSDocTypedefTag = 327, - JSDocPropertyTag = 328, - SyntaxList = 329, - NotEmittedStatement = 330, - PartiallyEmittedExpression = 331, - CommaListExpression = 332, - MergeDeclarationMarker = 333, - EndOfDeclarationMarker = 334, - SyntheticReferenceExpression = 335, - Count = 336, + IntrinsicKeyword = 136, + IsKeyword = 137, + KeyOfKeyword = 138, + ModuleKeyword = 139, + NamespaceKeyword = 140, + NeverKeyword = 141, + ReadonlyKeyword = 142, + RequireKeyword = 143, + NumberKeyword = 144, + ObjectKeyword = 145, + SetKeyword = 146, + StringKeyword = 147, + SymbolKeyword = 148, + TypeKeyword = 149, + UndefinedKeyword = 150, + UniqueKeyword = 151, + UnknownKeyword = 152, + FromKeyword = 153, + GlobalKeyword = 154, + BigIntKeyword = 155, + OfKeyword = 156, + QualifiedName = 157, + ComputedPropertyName = 158, + TypeParameter = 159, + Parameter = 160, + Decorator = 161, + PropertySignature = 162, + PropertyDeclaration = 163, + MethodSignature = 164, + MethodDeclaration = 165, + Constructor = 166, + GetAccessor = 167, + SetAccessor = 168, + CallSignature = 169, + ConstructSignature = 170, + IndexSignature = 171, + TypePredicate = 172, + TypeReference = 173, + FunctionType = 174, + ConstructorType = 175, + TypeQuery = 176, + TypeLiteral = 177, + ArrayType = 178, + TupleType = 179, + OptionalType = 180, + RestType = 181, + UnionType = 182, + IntersectionType = 183, + ConditionalType = 184, + InferType = 185, + ParenthesizedType = 186, + ThisType = 187, + TypeOperator = 188, + IndexedAccessType = 189, + MappedType = 190, + LiteralType = 191, + NamedTupleMember = 192, + TemplateLiteralType = 193, + TemplateLiteralTypeSpan = 194, + ImportType = 195, + ObjectBindingPattern = 196, + ArrayBindingPattern = 197, + BindingElement = 198, + ArrayLiteralExpression = 199, + ObjectLiteralExpression = 200, + PropertyAccessExpression = 201, + ElementAccessExpression = 202, + CallExpression = 203, + NewExpression = 204, + TaggedTemplateExpression = 205, + TypeAssertionExpression = 206, + ParenthesizedExpression = 207, + FunctionExpression = 208, + ArrowFunction = 209, + DeleteExpression = 210, + TypeOfExpression = 211, + VoidExpression = 212, + AwaitExpression = 213, + PrefixUnaryExpression = 214, + PostfixUnaryExpression = 215, + BinaryExpression = 216, + ConditionalExpression = 217, + TemplateExpression = 218, + YieldExpression = 219, + SpreadElement = 220, + ClassExpression = 221, + OmittedExpression = 222, + ExpressionWithTypeArguments = 223, + AsExpression = 224, + NonNullExpression = 225, + MetaProperty = 226, + SyntheticExpression = 227, + TemplateSpan = 228, + SemicolonClassElement = 229, + Block = 230, + EmptyStatement = 231, + VariableStatement = 232, + ExpressionStatement = 233, + IfStatement = 234, + DoStatement = 235, + WhileStatement = 236, + ForStatement = 237, + ForInStatement = 238, + ForOfStatement = 239, + ContinueStatement = 240, + BreakStatement = 241, + ReturnStatement = 242, + WithStatement = 243, + SwitchStatement = 244, + LabeledStatement = 245, + ThrowStatement = 246, + TryStatement = 247, + DebuggerStatement = 248, + VariableDeclaration = 249, + VariableDeclarationList = 250, + FunctionDeclaration = 251, + ClassDeclaration = 252, + InterfaceDeclaration = 253, + TypeAliasDeclaration = 254, + EnumDeclaration = 255, + ModuleDeclaration = 256, + ModuleBlock = 257, + CaseBlock = 258, + NamespaceExportDeclaration = 259, + ImportEqualsDeclaration = 260, + ImportDeclaration = 261, + ImportClause = 262, + NamespaceImport = 263, + NamedImports = 264, + ImportSpecifier = 265, + ExportAssignment = 266, + ExportDeclaration = 267, + NamedExports = 268, + NamespaceExport = 269, + ExportSpecifier = 270, + MissingDeclaration = 271, + ExternalModuleReference = 272, + JsxElement = 273, + JsxSelfClosingElement = 274, + JsxOpeningElement = 275, + JsxClosingElement = 276, + JsxFragment = 277, + JsxOpeningFragment = 278, + JsxClosingFragment = 279, + JsxAttribute = 280, + JsxAttributes = 281, + JsxSpreadAttribute = 282, + JsxExpression = 283, + CaseClause = 284, + DefaultClause = 285, + HeritageClause = 286, + CatchClause = 287, + PropertyAssignment = 288, + ShorthandPropertyAssignment = 289, + SpreadAssignment = 290, + EnumMember = 291, + UnparsedPrologue = 292, + UnparsedPrepend = 293, + UnparsedText = 294, + UnparsedInternalText = 295, + UnparsedSyntheticReference = 296, + SourceFile = 297, + Bundle = 298, + UnparsedSource = 299, + InputFiles = 300, + JSDocTypeExpression = 301, + JSDocNameReference = 302, + JSDocAllType = 303, + JSDocUnknownType = 304, + JSDocNullableType = 305, + JSDocNonNullableType = 306, + JSDocOptionalType = 307, + JSDocFunctionType = 308, + JSDocVariadicType = 309, + JSDocNamepathType = 310, + JSDocComment = 311, + JSDocTypeLiteral = 312, + JSDocSignature = 313, + JSDocTag = 314, + JSDocAugmentsTag = 315, + JSDocImplementsTag = 316, + JSDocAuthorTag = 317, + JSDocDeprecatedTag = 318, + JSDocClassTag = 319, + JSDocPublicTag = 320, + JSDocPrivateTag = 321, + JSDocProtectedTag = 322, + JSDocReadonlyTag = 323, + JSDocCallbackTag = 324, + JSDocEnumTag = 325, + JSDocParameterTag = 326, + JSDocReturnTag = 327, + JSDocThisTag = 328, + JSDocTypeTag = 329, + JSDocTemplateTag = 330, + JSDocTypedefTag = 331, + JSDocSeeTag = 332, + JSDocPropertyTag = 333, + SyntaxList = 334, + NotEmittedStatement = 335, + PartiallyEmittedExpression = 336, + CommaListExpression = 337, + MergeDeclarationMarker = 338, + EndOfDeclarationMarker = 339, + SyntheticReferenceExpression = 340, + Count = 341, FirstAssignment = 62, LastAssignment = 77, FirstCompoundAssignment = 63, @@ -448,15 +453,15 @@ declare namespace ts { FirstReservedWord = 80, LastReservedWord = 115, FirstKeyword = 80, - LastKeyword = 155, + LastKeyword = 156, FirstFutureReservedWord = 116, LastFutureReservedWord = 124, - FirstTypeNode = 171, - LastTypeNode = 192, + FirstTypeNode = 172, + LastTypeNode = 195, FirstPunctuation = 18, LastPunctuation = 77, FirstToken = 0, - LastToken = 155, + LastToken = 156, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 8, @@ -465,21 +470,21 @@ declare namespace ts { LastTemplateToken = 17, FirstBinaryOperator = 29, LastBinaryOperator = 77, - FirstStatement = 229, - LastStatement = 245, - FirstNode = 156, - FirstJSDocNode = 298, - LastJSDocNode = 328, - FirstJSDocTagNode = 310, - LastJSDocTagNode = 328, + FirstStatement = 232, + LastStatement = 248, + FirstNode = 157, + FirstJSDocNode = 301, + LastJSDocNode = 333, + FirstJSDocTagNode = 314, + LastJSDocTagNode = 333, } export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia; export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; export type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail; export type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken; - export type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; + export type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; export type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.StaticKeyword; - export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword; + export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword; export type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind; export type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken; export type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.Unknown | KeywordSyntaxKind; @@ -610,7 +615,8 @@ declare namespace ts { None = 0, ReservedInNestedScopes = 8, Optimistic = 16, - FileLevel = 32 + FileLevel = 32, + AllowNameSubstitution = 64 } export interface Identifier extends PrimaryExpression, Declaration { readonly kind: SyntaxKind.Identifier; @@ -942,6 +948,7 @@ declare namespace ts { readonly kind: SyntaxKind.MappedType; readonly readonlyToken?: ReadonlyToken | PlusToken | MinusToken; readonly typeParameter: TypeParameterDeclaration; + readonly nameType?: TypeNode; readonly questionToken?: QuestionToken | PlusToken | MinusToken; readonly type?: TypeNode; } @@ -954,6 +961,17 @@ declare namespace ts { } export type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral; export type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral; + export interface TemplateLiteralTypeNode extends TypeNode { + kind: SyntaxKind.TemplateLiteralType; + readonly head: TemplateHead; + readonly templateSpans: NodeArray; + } + export interface TemplateLiteralTypeSpan extends TypeNode { + readonly kind: SyntaxKind.TemplateLiteralTypeSpan; + readonly parent: TemplateLiteralTypeNode; + readonly type: TypeNode; + readonly literal: TemplateMiddle | TemplateTail; + } export interface Expression extends Node { _expressionBrand: any; } @@ -1142,15 +1160,15 @@ declare namespace ts { export type LiteralToken = NumericLiteral | BigIntLiteral | StringLiteral | JsxText | RegularExpressionLiteral | NoSubstitutionTemplateLiteral; export interface TemplateHead extends TemplateLiteralLikeNode { readonly kind: SyntaxKind.TemplateHead; - readonly parent: TemplateExpression; + readonly parent: TemplateExpression | TemplateLiteralTypeNode; } export interface TemplateMiddle extends TemplateLiteralLikeNode { readonly kind: SyntaxKind.TemplateMiddle; - readonly parent: TemplateSpan; + readonly parent: TemplateSpan | TemplateLiteralTypeSpan; } export interface TemplateTail extends TemplateLiteralLikeNode { readonly kind: SyntaxKind.TemplateTail; - readonly parent: TemplateSpan; + readonly parent: TemplateSpan | TemplateLiteralTypeSpan; } export type PseudoLiteralToken = TemplateHead | TemplateMiddle | TemplateTail; export type TemplateLiteralToken = NoSubstitutionTemplateLiteral | PseudoLiteralToken; @@ -1682,6 +1700,10 @@ declare namespace ts { readonly kind: SyntaxKind.JSDocTypeExpression; readonly type: TypeNode; } + export interface JSDocNameReference extends Node { + readonly kind: SyntaxKind.JSDocNameReference; + readonly name: EntityName; + } export interface JSDocType extends TypeNode { _jsDocTypeBrand: any; } @@ -1769,17 +1791,21 @@ declare namespace ts { export interface JSDocEnumTag extends JSDocTag, Declaration { readonly kind: SyntaxKind.JSDocEnumTag; readonly parent: JSDoc; - readonly typeExpression?: JSDocTypeExpression; + readonly typeExpression: JSDocTypeExpression; } export interface JSDocThisTag extends JSDocTag { readonly kind: SyntaxKind.JSDocThisTag; - readonly typeExpression?: JSDocTypeExpression; + readonly typeExpression: JSDocTypeExpression; } export interface JSDocTemplateTag extends JSDocTag { readonly kind: SyntaxKind.JSDocTemplateTag; readonly constraint: JSDocTypeExpression | undefined; readonly typeParameters: NodeArray; } + export interface JSDocSeeTag extends JSDocTag { + readonly kind: SyntaxKind.JSDocSeeTag; + readonly name?: JSDocNameReference; + } export interface JSDocReturnTag extends JSDocTag { readonly kind: SyntaxKind.JSDocReturnTag; readonly typeExpression?: JSDocTypeExpression; @@ -2053,6 +2079,7 @@ declare namespace ts { * Gets a type checker that can be used to semantically analyze source files in the program. */ getTypeChecker(): TypeChecker; + getTypeCatalog(): readonly Type[]; getNodeCount(): number; getIdentifierCount(): number; getSymbolCount(): number; @@ -2159,7 +2186,7 @@ declare namespace ts { * This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value. */ getShorthandAssignmentValueSymbol(location: Node): Symbol | undefined; - getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol | undefined; + getExportSpecifierLocalTargetSymbol(location: ExportSpecifier | Identifier): Symbol | undefined; /** * If a symbol is a local symbol with an associated exported symbol, returns the exported symbol. * Otherwise returns its input. @@ -2180,6 +2207,7 @@ declare namespace ts { getFullyQualifiedName(symbol: Symbol): string; getAugmentedPropertiesOfType(type: Type): Symbol[]; getRootSymbols(symbol: Symbol): readonly Symbol[]; + getSymbolOfExpando(node: Node, allowDeclaration: boolean): Symbol | undefined; getContextualType(node: Expression): Type | undefined; /** * returns unknownSignature in the case of an error. @@ -2450,11 +2478,13 @@ declare namespace ts { Conditional = 16777216, Substitution = 33554432, NonPrimitive = 67108864, + TemplateLiteral = 134217728, + StringMapping = 268435456, Literal = 2944, Unit = 109440, StringOrNumberLiteral = 384, PossiblyFalsy = 117724, - StringLike = 132, + StringLike = 402653316, NumberLike = 296, BigIntLike = 2112, BooleanLike = 528, @@ -2465,10 +2495,10 @@ declare namespace ts { StructuredType = 3670016, TypeVariable = 8650752, InstantiableNonPrimitive = 58982400, - InstantiablePrimitive = 4194304, - Instantiable = 63176704, - StructuredOrInstantiable = 66846720, - Narrowable = 133970943, + InstantiablePrimitive = 406847488, + Instantiable = 465829888, + StructuredOrInstantiable = 469499904, + Narrowable = 536624127, } export type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression; export interface Type { @@ -2605,8 +2635,6 @@ declare namespace ts { node: ConditionalTypeNode; checkType: Type; extendsType: Type; - trueType: Type; - falseType: Type; isDistributive: boolean; inferTypeParameters?: TypeParameter[]; outerTypeParameters?: TypeParameter[]; @@ -2621,6 +2649,14 @@ declare namespace ts { resolvedTrueType: Type; resolvedFalseType: Type; } + export interface TemplateLiteralType extends InstantiableType { + texts: readonly string[]; + types: readonly Type[]; + } + export interface StringMappingType extends InstantiableType { + symbol: Symbol; + type: Type; + } export interface SubstitutionType extends InstantiableType { baseType: Type; substitute: Type; @@ -2645,16 +2681,17 @@ declare namespace ts { } export enum InferencePriority { NakedTypeVariable = 1, - HomomorphicMappedType = 2, - PartialHomomorphicMappedType = 4, - MappedTypeConstraint = 8, - ContravariantConditional = 16, - ReturnType = 32, - LiteralKeyof = 64, - NoConstraints = 128, - AlwaysStrict = 256, - MaxValue = 512, - PriorityImpliesCombination = 104, + SpeculativeTuple = 2, + HomomorphicMappedType = 4, + PartialHomomorphicMappedType = 8, + MappedTypeConstraint = 16, + ContravariantConditional = 32, + ReturnType = 64, + LiteralKeyof = 128, + NoConstraints = 256, + AlwaysStrict = 512, + MaxValue = 1024, + PriorityImpliesCombination = 208, Circularity = -1 } /** @deprecated Use FileExtensionInfo instead. */ @@ -2753,6 +2790,7 @@ declare namespace ts { allowUnusedLabels?: boolean; alwaysStrict?: boolean; baseUrl?: string; + bundledPackageName?: string; charset?: string; checkJs?: boolean; declaration?: boolean; @@ -2762,6 +2800,7 @@ declare namespace ts { disableSizeLimit?: boolean; disableSourceOfProjectReferenceRedirect?: boolean; disableSolutionSearching?: boolean; + disableReferencedProjectLoad?: boolean; downlevelIteration?: boolean; emitBOM?: boolean; emitDecoratorMetadata?: boolean; @@ -2796,6 +2835,7 @@ declare namespace ts { assumeChangesOnlyAffectDirectDependencies?: boolean; noLib?: boolean; noResolve?: boolean; + noUncheckedIndexedAccess?: boolean; out?: string; outDir?: string; outFile?: string; @@ -2806,6 +2846,7 @@ declare namespace ts { reactNamespace?: string; jsxFactory?: string; jsxFragmentFactory?: string; + jsxImportSource?: string; composite?: boolean; incremental?: boolean; tsBuildInfoFile?: string; @@ -2866,7 +2907,9 @@ declare namespace ts { None = 0, Preserve = 1, React = 2, - ReactNative = 3 + ReactNative = 3, + ReactJSX = 4, + ReactJSXDev = 5 } export enum ImportsNotUsedAsValues { Remove = 0, @@ -3176,6 +3219,8 @@ declare namespace ts { updateConstructSignature(node: ConstructSignatureDeclaration, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode | undefined): ConstructSignatureDeclaration; createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; + createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan; + updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan; createKeywordTypeNode(kind: TKind): KeywordTypeNode; createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode; updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode; @@ -3216,10 +3261,12 @@ declare namespace ts { updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode; createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; - createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; - updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; + createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; + updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode; updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]): LiteralTypeNode; + createTemplateLiteralType(head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; + updateTemplateLiteralType(node: TemplateLiteralTypeNode, head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; createObjectBindingPattern(elements: readonly BindingElement[]): ObjectBindingPattern; updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]): ObjectBindingPattern; createArrayBindingPattern(elements: readonly ArrayBindingElement[]): ArrayBindingPattern; @@ -3399,6 +3446,8 @@ declare namespace ts { updateJSDocNamepathType(node: JSDocNamepathType, type: TypeNode): JSDocNamepathType; createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression; updateJSDocTypeExpression(node: JSDocTypeExpression, type: TypeNode): JSDocTypeExpression; + createJSDocNameReference(name: EntityName): JSDocNameReference; + updateJSDocNameReference(node: JSDocNameReference, name: EntityName): JSDocNameReference; createJSDocTypeLiteral(jsDocPropertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral; updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsDocPropertyTags: readonly JSDocPropertyLikeTag[] | undefined, isArrayType: boolean | undefined): JSDocTypeLiteral; createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature; @@ -3413,11 +3462,13 @@ declare namespace ts { updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | undefined): JSDocPropertyTag; createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocTypeTag; updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocTypeTag; + createJSDocSeeTag(tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string): JSDocSeeTag; + updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string): JSDocSeeTag; createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocReturnTag; updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocReturnTag; - createJSDocThisTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocThisTag; + createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocThisTag; updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocThisTag; - createJSDocEnumTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocEnumTag; + createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocEnumTag; updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocEnumTag; createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string): JSDocCallbackTag; updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | undefined): JSDocCallbackTag; @@ -3816,7 +3867,7 @@ declare namespace ts { readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; - readonly includePackageJsonAutoImports?: "exclude-dev" | "all" | "none"; + readonly includePackageJsonAutoImports?: "auto" | "on" | "off"; readonly provideRefactorNotApplicableReason?: boolean; } /** Represents a bigint literal value without requiring bigint support */ @@ -4000,6 +4051,14 @@ declare namespace ts { function getOriginalNode(node: Node, nodeTest: (node: Node) => node is T): T; function getOriginalNode(node: Node | undefined): Node | undefined; function getOriginalNode(node: Node | undefined, nodeTest: (node: Node | undefined) => node is T): T | undefined; + /** + * Iterates through the parent chain of a node and performs the callback on each parent until the callback + * returns a truthy value, then returns that value. + * If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit" + * At that point findAncestor returns undefined. + */ + function findAncestor(node: Node | undefined, callback: (element: Node) => element is T): T | undefined; + function findAncestor(node: Node | undefined, callback: (element: Node) => boolean | "quit"): Node | undefined; /** * Gets a value indicating whether a node originated in the parse tree. * @@ -4304,6 +4363,7 @@ declare namespace ts { function isTypeLiteralNode(node: Node): node is TypeLiteralNode; function isArrayTypeNode(node: Node): node is ArrayTypeNode; function isTupleTypeNode(node: Node): node is TupleTypeNode; + function isNamedTupleMember(node: Node): node is NamedTupleMember; function isOptionalTypeNode(node: Node): node is OptionalTypeNode; function isRestTypeNode(node: Node): node is RestTypeNode; function isUnionTypeNode(node: Node): node is UnionTypeNode; @@ -4317,6 +4377,7 @@ declare namespace ts { function isMappedTypeNode(node: Node): node is MappedTypeNode; function isLiteralTypeNode(node: Node): node is LiteralTypeNode; function isImportTypeNode(node: Node): node is ImportTypeNode; + function isTemplateLiteralTypeSpan(node: Node): node is TemplateLiteralTypeSpan; function isObjectBindingPattern(node: Node): node is ObjectBindingPattern; function isArrayBindingPattern(node: Node): node is ArrayBindingPattern; function isBindingElement(node: Node): node is BindingElement; @@ -4421,6 +4482,7 @@ declare namespace ts { function isBundle(node: Node): node is Bundle; function isUnparsedSource(node: Node): node is UnparsedSource; function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression; + function isJSDocNameReference(node: Node): node is JSDocNameReference; function isJSDocAllType(node: Node): node is JSDocAllType; function isJSDocUnknownType(node: Node): node is JSDocUnknownType; function isJSDocNullableType(node: Node): node is JSDocNullableType; @@ -5312,6 +5374,11 @@ declare namespace ts { kind: "UpdateGraph" | "CreatePackageJsonAutoImportProvider"; durationMs: number; } + enum LanguageServiceMode { + Semantic = 0, + PartialSemantic = 1, + Syntactic = 2 + } interface LanguageServiceHost extends GetEffectiveTypeRootsHost { getCompilationSettings(): CompilerOptions; getNewLine?(): string; @@ -5349,6 +5416,10 @@ declare namespace ts { type WithMetadata = T & { metadata?: unknown; }; + enum SemanticClassificationFormat { + Original = "original", + TwentyTwenty = "2020" + } interface LanguageService { /** This is used as a part of restarting the language service. */ cleanupSemanticCache(): void; @@ -5400,10 +5471,22 @@ declare namespace ts { getCompilerOptionsDiagnostics(): Diagnostic[]; /** @deprecated Use getEncodedSyntacticClassifications instead. */ getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getSyntacticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; /** @deprecated Use getEncodedSemanticClassifications instead. */ getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getSemanticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; + /** Encoded as triples of [start, length, ClassificationType]. */ getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications; - getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications; + /** + * Gets semantic highlights information for a particular file. Has two formats, an older + * version used by VS and a format used by VS Code. + * + * @param fileName The path to the file + * @param position A text span to return results within + * @param format Which format to use, defaults to "original" + * @returns a number array encoded as triples of [start, length, ClassificationType, ...]. + */ + getEncodedSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): Classifications; /** * Gets completion entries at a particular position in a file. * @@ -5562,6 +5645,10 @@ declare namespace ts { textSpan: TextSpan; classificationType: ClassificationTypeNames; } + interface ClassifiedSpan2020 { + textSpan: TextSpan; + classificationType: number; + } /** * Navigation bar interface designed for visual studio's dual-column layout. * This does not form a proper tree. @@ -5958,6 +6045,12 @@ declare namespace ts { /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */ isGlobalCompletion: boolean; isMemberCompletion: boolean; + /** + * In the absence of `CompletionEntry["replacementSpan"], the editor may choose whether to use + * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span + * must be used to commit that completion entry. + */ + optionalReplacementSpan?: TextSpan; /** * true when the current location also allows for a new identifier */ @@ -6323,7 +6416,7 @@ declare namespace ts { function getSupportedCodeFixes(): string[]; function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile; function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange | undefined, aggressiveChecks?: boolean): SourceFile; - function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnly?: boolean): LanguageService; + function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnlyOrLanguageServiceMode?: boolean | LanguageServiceMode): LanguageService; /** * Get the path of the default library files (lib.d.ts) as distributed with the typescript * node package. @@ -6873,6 +6966,11 @@ declare namespace ts.server.protocol { * so this description should make sense by itself if the parent is inlineable=true */ description: string; + /** + * A message to show to the user if the refactoring cannot be applied in + * the current context. + */ + notApplicableReason?: string; } interface GetEditsForRefactorRequest extends Request { command: CommandTypes.GetEditsForRefactor; @@ -8096,6 +8194,12 @@ declare namespace ts.server.protocol { readonly isGlobalCompletion: boolean; readonly isMemberCompletion: boolean; readonly isNewIdentifierLocation: boolean; + /** + * In the absence of `CompletionEntry["replacementSpan"]`, the editor may choose whether to use + * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span + * must be used to commit that completion entry. + */ + readonly optionalReplacementSpan?: TextSpan; readonly entries: readonly CompletionEntry[]; } interface CompletionDetailsResponse extends Response { @@ -8894,8 +8998,9 @@ declare namespace ts.server.protocol { readonly allowTextChangesInNewFiles?: boolean; readonly lazyConfiguredProjectsFromExternalProject?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; + readonly provideRefactorNotApplicableReason?: boolean; readonly allowRenameOfImportPath?: boolean; - readonly includePackageJsonAutoImports?: "exclude-dev" | "all" | "none"; + readonly includePackageJsonAutoImports?: "auto" | "on" | "off"; } interface CompilerOptions { allowJs?: boolean; @@ -9268,6 +9373,9 @@ declare namespace ts.server { getScriptFileNames(): string[]; getLanguageService(): never; markAutoImportProviderAsDirty(): never; + getModuleResolutionHostForAutoImportProvider(): never; + getProjectReferences(): readonly ProjectReference[] | undefined; + useSourceOfProjectReferenceRedirect(): boolean; getTypeAcquisition(): TypeAcquisition; } /** @@ -9478,7 +9586,9 @@ declare namespace ts.server { pluginProbeLocations?: readonly string[]; allowLocalPluginLoads?: boolean; typesMapLocation?: string; + /** @deprecated use serverMode instead */ syntaxOnly?: boolean; + serverMode?: LanguageServiceMode; } export class ProjectService { private readonly scriptInfoInNodeModulesWatchers; @@ -9550,7 +9660,9 @@ declare namespace ts.server { readonly allowLocalPluginLoads: boolean; private currentPluginConfigOverrides; readonly typesMapLocation: string | undefined; - readonly syntaxOnly?: boolean; + /** @deprecated use serverMode instead */ + readonly syntaxOnly: boolean; + readonly serverMode: LanguageServiceMode; /** Tracks projects that we have already sent telemetry for. */ private readonly seenProjects; private performanceEventHandler?; @@ -9768,7 +9880,9 @@ declare namespace ts.server { eventHandler?: ProjectServiceEventHandler; /** Has no effect if eventHandler is also specified. */ suppressDiagnosticEvents?: boolean; + /** @deprecated use serverMode instead */ syntaxOnly?: boolean; + serverMode?: LanguageServiceMode; throttleWaitMilliseconds?: number; noGetErrOnBackgroundUpdate?: boolean; globalPlugins?: readonly string[]; @@ -10106,9 +10220,9 @@ declare namespace ts { /** @deprecated Use `factory.updateIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */ const updateIndexedAccessTypeNode: (node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode) => IndexedAccessTypeNode; /** @deprecated Use `factory.createMappedTypeNode` or the factory supplied by your transformation context instead. */ - const createMappedTypeNode: (readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode; + const createMappedTypeNode: (readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode; /** @deprecated Use `factory.updateMappedTypeNode` or the factory supplied by your transformation context instead. */ - const updateMappedTypeNode: (node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode; + const updateMappedTypeNode: (node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode; /** @deprecated Use `factory.createLiteralTypeNode` or the factory supplied by your transformation context instead. */ const createLiteralTypeNode: (literal: LiteralExpression | TrueLiteral | FalseLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode; /** @deprecated Use `factory.updateLiteralTypeNode` or the factory supplied by your transformation context instead. */ @@ -10414,7 +10528,7 @@ declare namespace ts { /** @deprecated Use `factory.createJSDocReturnTag` or the factory supplied by your transformation context instead. */ const createJSDocReturnTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocReturnTag; /** @deprecated Use `factory.createJSDocThisTag` or the factory supplied by your transformation context instead. */ - const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocThisTag; + const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | undefined) => JSDocThisTag; /** @deprecated Use `factory.createJSDocComment` or the factory supplied by your transformation context instead. */ const createJSDocComment: (comment?: string | undefined, tags?: readonly JSDocTag[] | undefined) => JSDoc; /** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */ @@ -10426,7 +10540,7 @@ declare namespace ts { readonly expression: Identifier | PropertyAccessEntityNameExpression; }, comment?: string | undefined) => JSDocAugmentsTag; /** @deprecated Use `factory.createJSDocEnumTag` or the factory supplied by your transformation context instead. */ - const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocEnumTag; + const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | undefined) => JSDocEnumTag; /** @deprecated Use `factory.createJSDocTemplateTag` or the factory supplied by your transformation context instead. */ const createJSDocTemplateTag: (tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | undefined) => JSDocTemplateTag; /** @deprecated Use `factory.createJSDocTypedefTag` or the factory supplied by your transformation context instead. */ diff --git a/tests/baselines/reference/api/typescript.d.ts b/tests/baselines/reference/api/typescript.d.ts index 3f7f6823424..26cdf6ba460 100644 --- a/tests/baselines/reference/api/typescript.d.ts +++ b/tests/baselines/reference/api/typescript.d.ts @@ -14,7 +14,7 @@ and limitations under the License. ***************************************************************************** */ declare namespace ts { - const versionMajorMinor = "4.0"; + const versionMajorMinor = "4.1"; /** The version of the TypeScript compiler release */ const version: string; /** @@ -240,207 +240,212 @@ declare namespace ts { DeclareKeyword = 133, GetKeyword = 134, InferKeyword = 135, - IsKeyword = 136, - KeyOfKeyword = 137, - ModuleKeyword = 138, - NamespaceKeyword = 139, - NeverKeyword = 140, - ReadonlyKeyword = 141, - RequireKeyword = 142, - NumberKeyword = 143, - ObjectKeyword = 144, - SetKeyword = 145, - StringKeyword = 146, - SymbolKeyword = 147, - TypeKeyword = 148, - UndefinedKeyword = 149, - UniqueKeyword = 150, - UnknownKeyword = 151, - FromKeyword = 152, - GlobalKeyword = 153, - BigIntKeyword = 154, - OfKeyword = 155, - QualifiedName = 156, - ComputedPropertyName = 157, - TypeParameter = 158, - Parameter = 159, - Decorator = 160, - PropertySignature = 161, - PropertyDeclaration = 162, - MethodSignature = 163, - MethodDeclaration = 164, - Constructor = 165, - GetAccessor = 166, - SetAccessor = 167, - CallSignature = 168, - ConstructSignature = 169, - IndexSignature = 170, - TypePredicate = 171, - TypeReference = 172, - FunctionType = 173, - ConstructorType = 174, - TypeQuery = 175, - TypeLiteral = 176, - ArrayType = 177, - TupleType = 178, - OptionalType = 179, - RestType = 180, - UnionType = 181, - IntersectionType = 182, - ConditionalType = 183, - InferType = 184, - ParenthesizedType = 185, - ThisType = 186, - TypeOperator = 187, - IndexedAccessType = 188, - MappedType = 189, - LiteralType = 190, - NamedTupleMember = 191, - ImportType = 192, - ObjectBindingPattern = 193, - ArrayBindingPattern = 194, - BindingElement = 195, - ArrayLiteralExpression = 196, - ObjectLiteralExpression = 197, - PropertyAccessExpression = 198, - ElementAccessExpression = 199, - CallExpression = 200, - NewExpression = 201, - TaggedTemplateExpression = 202, - TypeAssertionExpression = 203, - ParenthesizedExpression = 204, - FunctionExpression = 205, - ArrowFunction = 206, - DeleteExpression = 207, - TypeOfExpression = 208, - VoidExpression = 209, - AwaitExpression = 210, - PrefixUnaryExpression = 211, - PostfixUnaryExpression = 212, - BinaryExpression = 213, - ConditionalExpression = 214, - TemplateExpression = 215, - YieldExpression = 216, - SpreadElement = 217, - ClassExpression = 218, - OmittedExpression = 219, - ExpressionWithTypeArguments = 220, - AsExpression = 221, - NonNullExpression = 222, - MetaProperty = 223, - SyntheticExpression = 224, - TemplateSpan = 225, - SemicolonClassElement = 226, - Block = 227, - EmptyStatement = 228, - VariableStatement = 229, - ExpressionStatement = 230, - IfStatement = 231, - DoStatement = 232, - WhileStatement = 233, - ForStatement = 234, - ForInStatement = 235, - ForOfStatement = 236, - ContinueStatement = 237, - BreakStatement = 238, - ReturnStatement = 239, - WithStatement = 240, - SwitchStatement = 241, - LabeledStatement = 242, - ThrowStatement = 243, - TryStatement = 244, - DebuggerStatement = 245, - VariableDeclaration = 246, - VariableDeclarationList = 247, - FunctionDeclaration = 248, - ClassDeclaration = 249, - InterfaceDeclaration = 250, - TypeAliasDeclaration = 251, - EnumDeclaration = 252, - ModuleDeclaration = 253, - ModuleBlock = 254, - CaseBlock = 255, - NamespaceExportDeclaration = 256, - ImportEqualsDeclaration = 257, - ImportDeclaration = 258, - ImportClause = 259, - NamespaceImport = 260, - NamedImports = 261, - ImportSpecifier = 262, - ExportAssignment = 263, - ExportDeclaration = 264, - NamedExports = 265, - NamespaceExport = 266, - ExportSpecifier = 267, - MissingDeclaration = 268, - ExternalModuleReference = 269, - JsxElement = 270, - JsxSelfClosingElement = 271, - JsxOpeningElement = 272, - JsxClosingElement = 273, - JsxFragment = 274, - JsxOpeningFragment = 275, - JsxClosingFragment = 276, - JsxAttribute = 277, - JsxAttributes = 278, - JsxSpreadAttribute = 279, - JsxExpression = 280, - CaseClause = 281, - DefaultClause = 282, - HeritageClause = 283, - CatchClause = 284, - PropertyAssignment = 285, - ShorthandPropertyAssignment = 286, - SpreadAssignment = 287, - EnumMember = 288, - UnparsedPrologue = 289, - UnparsedPrepend = 290, - UnparsedText = 291, - UnparsedInternalText = 292, - UnparsedSyntheticReference = 293, - SourceFile = 294, - Bundle = 295, - UnparsedSource = 296, - InputFiles = 297, - JSDocTypeExpression = 298, - JSDocAllType = 299, - JSDocUnknownType = 300, - JSDocNullableType = 301, - JSDocNonNullableType = 302, - JSDocOptionalType = 303, - JSDocFunctionType = 304, - JSDocVariadicType = 305, - JSDocNamepathType = 306, - JSDocComment = 307, - JSDocTypeLiteral = 308, - JSDocSignature = 309, - JSDocTag = 310, - JSDocAugmentsTag = 311, - JSDocImplementsTag = 312, - JSDocAuthorTag = 313, - JSDocDeprecatedTag = 314, - JSDocClassTag = 315, - JSDocPublicTag = 316, - JSDocPrivateTag = 317, - JSDocProtectedTag = 318, - JSDocReadonlyTag = 319, - JSDocCallbackTag = 320, - JSDocEnumTag = 321, - JSDocParameterTag = 322, - JSDocReturnTag = 323, - JSDocThisTag = 324, - JSDocTypeTag = 325, - JSDocTemplateTag = 326, - JSDocTypedefTag = 327, - JSDocPropertyTag = 328, - SyntaxList = 329, - NotEmittedStatement = 330, - PartiallyEmittedExpression = 331, - CommaListExpression = 332, - MergeDeclarationMarker = 333, - EndOfDeclarationMarker = 334, - SyntheticReferenceExpression = 335, - Count = 336, + IntrinsicKeyword = 136, + IsKeyword = 137, + KeyOfKeyword = 138, + ModuleKeyword = 139, + NamespaceKeyword = 140, + NeverKeyword = 141, + ReadonlyKeyword = 142, + RequireKeyword = 143, + NumberKeyword = 144, + ObjectKeyword = 145, + SetKeyword = 146, + StringKeyword = 147, + SymbolKeyword = 148, + TypeKeyword = 149, + UndefinedKeyword = 150, + UniqueKeyword = 151, + UnknownKeyword = 152, + FromKeyword = 153, + GlobalKeyword = 154, + BigIntKeyword = 155, + OfKeyword = 156, + QualifiedName = 157, + ComputedPropertyName = 158, + TypeParameter = 159, + Parameter = 160, + Decorator = 161, + PropertySignature = 162, + PropertyDeclaration = 163, + MethodSignature = 164, + MethodDeclaration = 165, + Constructor = 166, + GetAccessor = 167, + SetAccessor = 168, + CallSignature = 169, + ConstructSignature = 170, + IndexSignature = 171, + TypePredicate = 172, + TypeReference = 173, + FunctionType = 174, + ConstructorType = 175, + TypeQuery = 176, + TypeLiteral = 177, + ArrayType = 178, + TupleType = 179, + OptionalType = 180, + RestType = 181, + UnionType = 182, + IntersectionType = 183, + ConditionalType = 184, + InferType = 185, + ParenthesizedType = 186, + ThisType = 187, + TypeOperator = 188, + IndexedAccessType = 189, + MappedType = 190, + LiteralType = 191, + NamedTupleMember = 192, + TemplateLiteralType = 193, + TemplateLiteralTypeSpan = 194, + ImportType = 195, + ObjectBindingPattern = 196, + ArrayBindingPattern = 197, + BindingElement = 198, + ArrayLiteralExpression = 199, + ObjectLiteralExpression = 200, + PropertyAccessExpression = 201, + ElementAccessExpression = 202, + CallExpression = 203, + NewExpression = 204, + TaggedTemplateExpression = 205, + TypeAssertionExpression = 206, + ParenthesizedExpression = 207, + FunctionExpression = 208, + ArrowFunction = 209, + DeleteExpression = 210, + TypeOfExpression = 211, + VoidExpression = 212, + AwaitExpression = 213, + PrefixUnaryExpression = 214, + PostfixUnaryExpression = 215, + BinaryExpression = 216, + ConditionalExpression = 217, + TemplateExpression = 218, + YieldExpression = 219, + SpreadElement = 220, + ClassExpression = 221, + OmittedExpression = 222, + ExpressionWithTypeArguments = 223, + AsExpression = 224, + NonNullExpression = 225, + MetaProperty = 226, + SyntheticExpression = 227, + TemplateSpan = 228, + SemicolonClassElement = 229, + Block = 230, + EmptyStatement = 231, + VariableStatement = 232, + ExpressionStatement = 233, + IfStatement = 234, + DoStatement = 235, + WhileStatement = 236, + ForStatement = 237, + ForInStatement = 238, + ForOfStatement = 239, + ContinueStatement = 240, + BreakStatement = 241, + ReturnStatement = 242, + WithStatement = 243, + SwitchStatement = 244, + LabeledStatement = 245, + ThrowStatement = 246, + TryStatement = 247, + DebuggerStatement = 248, + VariableDeclaration = 249, + VariableDeclarationList = 250, + FunctionDeclaration = 251, + ClassDeclaration = 252, + InterfaceDeclaration = 253, + TypeAliasDeclaration = 254, + EnumDeclaration = 255, + ModuleDeclaration = 256, + ModuleBlock = 257, + CaseBlock = 258, + NamespaceExportDeclaration = 259, + ImportEqualsDeclaration = 260, + ImportDeclaration = 261, + ImportClause = 262, + NamespaceImport = 263, + NamedImports = 264, + ImportSpecifier = 265, + ExportAssignment = 266, + ExportDeclaration = 267, + NamedExports = 268, + NamespaceExport = 269, + ExportSpecifier = 270, + MissingDeclaration = 271, + ExternalModuleReference = 272, + JsxElement = 273, + JsxSelfClosingElement = 274, + JsxOpeningElement = 275, + JsxClosingElement = 276, + JsxFragment = 277, + JsxOpeningFragment = 278, + JsxClosingFragment = 279, + JsxAttribute = 280, + JsxAttributes = 281, + JsxSpreadAttribute = 282, + JsxExpression = 283, + CaseClause = 284, + DefaultClause = 285, + HeritageClause = 286, + CatchClause = 287, + PropertyAssignment = 288, + ShorthandPropertyAssignment = 289, + SpreadAssignment = 290, + EnumMember = 291, + UnparsedPrologue = 292, + UnparsedPrepend = 293, + UnparsedText = 294, + UnparsedInternalText = 295, + UnparsedSyntheticReference = 296, + SourceFile = 297, + Bundle = 298, + UnparsedSource = 299, + InputFiles = 300, + JSDocTypeExpression = 301, + JSDocNameReference = 302, + JSDocAllType = 303, + JSDocUnknownType = 304, + JSDocNullableType = 305, + JSDocNonNullableType = 306, + JSDocOptionalType = 307, + JSDocFunctionType = 308, + JSDocVariadicType = 309, + JSDocNamepathType = 310, + JSDocComment = 311, + JSDocTypeLiteral = 312, + JSDocSignature = 313, + JSDocTag = 314, + JSDocAugmentsTag = 315, + JSDocImplementsTag = 316, + JSDocAuthorTag = 317, + JSDocDeprecatedTag = 318, + JSDocClassTag = 319, + JSDocPublicTag = 320, + JSDocPrivateTag = 321, + JSDocProtectedTag = 322, + JSDocReadonlyTag = 323, + JSDocCallbackTag = 324, + JSDocEnumTag = 325, + JSDocParameterTag = 326, + JSDocReturnTag = 327, + JSDocThisTag = 328, + JSDocTypeTag = 329, + JSDocTemplateTag = 330, + JSDocTypedefTag = 331, + JSDocSeeTag = 332, + JSDocPropertyTag = 333, + SyntaxList = 334, + NotEmittedStatement = 335, + PartiallyEmittedExpression = 336, + CommaListExpression = 337, + MergeDeclarationMarker = 338, + EndOfDeclarationMarker = 339, + SyntheticReferenceExpression = 340, + Count = 341, FirstAssignment = 62, LastAssignment = 77, FirstCompoundAssignment = 63, @@ -448,15 +453,15 @@ declare namespace ts { FirstReservedWord = 80, LastReservedWord = 115, FirstKeyword = 80, - LastKeyword = 155, + LastKeyword = 156, FirstFutureReservedWord = 116, LastFutureReservedWord = 124, - FirstTypeNode = 171, - LastTypeNode = 192, + FirstTypeNode = 172, + LastTypeNode = 195, FirstPunctuation = 18, LastPunctuation = 77, FirstToken = 0, - LastToken = 155, + LastToken = 156, FirstTriviaToken = 2, LastTriviaToken = 7, FirstLiteralToken = 8, @@ -465,21 +470,21 @@ declare namespace ts { LastTemplateToken = 17, FirstBinaryOperator = 29, LastBinaryOperator = 77, - FirstStatement = 229, - LastStatement = 245, - FirstNode = 156, - FirstJSDocNode = 298, - LastJSDocNode = 328, - FirstJSDocTagNode = 310, - LastJSDocTagNode = 328, + FirstStatement = 232, + LastStatement = 248, + FirstNode = 157, + FirstJSDocNode = 301, + LastJSDocNode = 333, + FirstJSDocTagNode = 314, + LastJSDocTagNode = 333, } export type TriviaSyntaxKind = SyntaxKind.SingleLineCommentTrivia | SyntaxKind.MultiLineCommentTrivia | SyntaxKind.NewLineTrivia | SyntaxKind.WhitespaceTrivia | SyntaxKind.ShebangTrivia | SyntaxKind.ConflictMarkerTrivia; export type LiteralSyntaxKind = SyntaxKind.NumericLiteral | SyntaxKind.BigIntLiteral | SyntaxKind.StringLiteral | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.RegularExpressionLiteral | SyntaxKind.NoSubstitutionTemplateLiteral; export type PseudoLiteralSyntaxKind = SyntaxKind.TemplateHead | SyntaxKind.TemplateMiddle | SyntaxKind.TemplateTail; export type PunctuationSyntaxKind = SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.OpenParenToken | SyntaxKind.CloseParenToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.DotToken | SyntaxKind.DotDotDotToken | SyntaxKind.SemicolonToken | SyntaxKind.CommaToken | SyntaxKind.QuestionDotToken | SyntaxKind.LessThanToken | SyntaxKind.LessThanSlashToken | SyntaxKind.GreaterThanToken | SyntaxKind.LessThanEqualsToken | SyntaxKind.GreaterThanEqualsToken | SyntaxKind.EqualsEqualsToken | SyntaxKind.ExclamationEqualsToken | SyntaxKind.EqualsEqualsEqualsToken | SyntaxKind.ExclamationEqualsEqualsToken | SyntaxKind.EqualsGreaterThanToken | SyntaxKind.PlusToken | SyntaxKind.MinusToken | SyntaxKind.AsteriskToken | SyntaxKind.AsteriskAsteriskToken | SyntaxKind.SlashToken | SyntaxKind.PercentToken | SyntaxKind.PlusPlusToken | SyntaxKind.MinusMinusToken | SyntaxKind.LessThanLessThanToken | SyntaxKind.GreaterThanGreaterThanToken | SyntaxKind.GreaterThanGreaterThanGreaterThanToken | SyntaxKind.AmpersandToken | SyntaxKind.BarToken | SyntaxKind.CaretToken | SyntaxKind.ExclamationToken | SyntaxKind.TildeToken | SyntaxKind.AmpersandAmpersandToken | SyntaxKind.BarBarToken | SyntaxKind.QuestionQuestionToken | SyntaxKind.QuestionToken | SyntaxKind.ColonToken | SyntaxKind.AtToken | SyntaxKind.BacktickToken | SyntaxKind.EqualsToken | SyntaxKind.PlusEqualsToken | SyntaxKind.MinusEqualsToken | SyntaxKind.AsteriskEqualsToken | SyntaxKind.AsteriskAsteriskEqualsToken | SyntaxKind.SlashEqualsToken | SyntaxKind.PercentEqualsToken | SyntaxKind.LessThanLessThanEqualsToken | SyntaxKind.GreaterThanGreaterThanEqualsToken | SyntaxKind.GreaterThanGreaterThanGreaterThanEqualsToken | SyntaxKind.AmpersandEqualsToken | SyntaxKind.BarEqualsToken | SyntaxKind.CaretEqualsToken; - export type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; + export type KeywordSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AnyKeyword | SyntaxKind.AsKeyword | SyntaxKind.AssertsKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.AwaitKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.BreakKeyword | SyntaxKind.CaseKeyword | SyntaxKind.CatchKeyword | SyntaxKind.ClassKeyword | SyntaxKind.ConstKeyword | SyntaxKind.ConstructorKeyword | SyntaxKind.ContinueKeyword | SyntaxKind.DebuggerKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.DeleteKeyword | SyntaxKind.DoKeyword | SyntaxKind.ElseKeyword | SyntaxKind.EnumKeyword | SyntaxKind.ExportKeyword | SyntaxKind.ExtendsKeyword | SyntaxKind.FalseKeyword | SyntaxKind.FinallyKeyword | SyntaxKind.ForKeyword | SyntaxKind.FromKeyword | SyntaxKind.FunctionKeyword | SyntaxKind.GetKeyword | SyntaxKind.GlobalKeyword | SyntaxKind.IfKeyword | SyntaxKind.ImplementsKeyword | SyntaxKind.ImportKeyword | SyntaxKind.InferKeyword | SyntaxKind.InKeyword | SyntaxKind.InstanceOfKeyword | SyntaxKind.InterfaceKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.IsKeyword | SyntaxKind.KeyOfKeyword | SyntaxKind.LetKeyword | SyntaxKind.ModuleKeyword | SyntaxKind.NamespaceKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NewKeyword | SyntaxKind.NullKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.OfKeyword | SyntaxKind.PackageKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.RequireKeyword | SyntaxKind.ReturnKeyword | SyntaxKind.SetKeyword | SyntaxKind.StaticKeyword | SyntaxKind.StringKeyword | SyntaxKind.SuperKeyword | SyntaxKind.SwitchKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.ThisKeyword | SyntaxKind.ThrowKeyword | SyntaxKind.TrueKeyword | SyntaxKind.TryKeyword | SyntaxKind.TypeKeyword | SyntaxKind.TypeOfKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UniqueKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VarKeyword | SyntaxKind.VoidKeyword | SyntaxKind.WhileKeyword | SyntaxKind.WithKeyword | SyntaxKind.YieldKeyword; export type ModifierSyntaxKind = SyntaxKind.AbstractKeyword | SyntaxKind.AsyncKeyword | SyntaxKind.ConstKeyword | SyntaxKind.DeclareKeyword | SyntaxKind.DefaultKeyword | SyntaxKind.ExportKeyword | SyntaxKind.PrivateKeyword | SyntaxKind.ProtectedKeyword | SyntaxKind.PublicKeyword | SyntaxKind.ReadonlyKeyword | SyntaxKind.StaticKeyword; - export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword; + export type KeywordTypeSyntaxKind = SyntaxKind.AnyKeyword | SyntaxKind.BigIntKeyword | SyntaxKind.BooleanKeyword | SyntaxKind.IntrinsicKeyword | SyntaxKind.NeverKeyword | SyntaxKind.NumberKeyword | SyntaxKind.ObjectKeyword | SyntaxKind.StringKeyword | SyntaxKind.SymbolKeyword | SyntaxKind.UndefinedKeyword | SyntaxKind.UnknownKeyword | SyntaxKind.VoidKeyword; export type TokenSyntaxKind = SyntaxKind.Unknown | SyntaxKind.EndOfFileToken | TriviaSyntaxKind | LiteralSyntaxKind | PseudoLiteralSyntaxKind | PunctuationSyntaxKind | SyntaxKind.Identifier | KeywordSyntaxKind; export type JsxTokenSyntaxKind = SyntaxKind.LessThanSlashToken | SyntaxKind.EndOfFileToken | SyntaxKind.ConflictMarkerTrivia | SyntaxKind.JsxText | SyntaxKind.JsxTextAllWhiteSpaces | SyntaxKind.OpenBraceToken | SyntaxKind.LessThanToken; export type JSDocSyntaxKind = SyntaxKind.EndOfFileToken | SyntaxKind.WhitespaceTrivia | SyntaxKind.AtToken | SyntaxKind.NewLineTrivia | SyntaxKind.AsteriskToken | SyntaxKind.OpenBraceToken | SyntaxKind.CloseBraceToken | SyntaxKind.LessThanToken | SyntaxKind.GreaterThanToken | SyntaxKind.OpenBracketToken | SyntaxKind.CloseBracketToken | SyntaxKind.EqualsToken | SyntaxKind.CommaToken | SyntaxKind.DotToken | SyntaxKind.Identifier | SyntaxKind.BacktickToken | SyntaxKind.Unknown | KeywordSyntaxKind; @@ -610,7 +615,8 @@ declare namespace ts { None = 0, ReservedInNestedScopes = 8, Optimistic = 16, - FileLevel = 32 + FileLevel = 32, + AllowNameSubstitution = 64 } export interface Identifier extends PrimaryExpression, Declaration { readonly kind: SyntaxKind.Identifier; @@ -942,6 +948,7 @@ declare namespace ts { readonly kind: SyntaxKind.MappedType; readonly readonlyToken?: ReadonlyToken | PlusToken | MinusToken; readonly typeParameter: TypeParameterDeclaration; + readonly nameType?: TypeNode; readonly questionToken?: QuestionToken | PlusToken | MinusToken; readonly type?: TypeNode; } @@ -954,6 +961,17 @@ declare namespace ts { } export type StringLiteralLike = StringLiteral | NoSubstitutionTemplateLiteral; export type PropertyNameLiteral = Identifier | StringLiteralLike | NumericLiteral; + export interface TemplateLiteralTypeNode extends TypeNode { + kind: SyntaxKind.TemplateLiteralType; + readonly head: TemplateHead; + readonly templateSpans: NodeArray; + } + export interface TemplateLiteralTypeSpan extends TypeNode { + readonly kind: SyntaxKind.TemplateLiteralTypeSpan; + readonly parent: TemplateLiteralTypeNode; + readonly type: TypeNode; + readonly literal: TemplateMiddle | TemplateTail; + } export interface Expression extends Node { _expressionBrand: any; } @@ -1142,15 +1160,15 @@ declare namespace ts { export type LiteralToken = NumericLiteral | BigIntLiteral | StringLiteral | JsxText | RegularExpressionLiteral | NoSubstitutionTemplateLiteral; export interface TemplateHead extends TemplateLiteralLikeNode { readonly kind: SyntaxKind.TemplateHead; - readonly parent: TemplateExpression; + readonly parent: TemplateExpression | TemplateLiteralTypeNode; } export interface TemplateMiddle extends TemplateLiteralLikeNode { readonly kind: SyntaxKind.TemplateMiddle; - readonly parent: TemplateSpan; + readonly parent: TemplateSpan | TemplateLiteralTypeSpan; } export interface TemplateTail extends TemplateLiteralLikeNode { readonly kind: SyntaxKind.TemplateTail; - readonly parent: TemplateSpan; + readonly parent: TemplateSpan | TemplateLiteralTypeSpan; } export type PseudoLiteralToken = TemplateHead | TemplateMiddle | TemplateTail; export type TemplateLiteralToken = NoSubstitutionTemplateLiteral | PseudoLiteralToken; @@ -1682,6 +1700,10 @@ declare namespace ts { readonly kind: SyntaxKind.JSDocTypeExpression; readonly type: TypeNode; } + export interface JSDocNameReference extends Node { + readonly kind: SyntaxKind.JSDocNameReference; + readonly name: EntityName; + } export interface JSDocType extends TypeNode { _jsDocTypeBrand: any; } @@ -1769,17 +1791,21 @@ declare namespace ts { export interface JSDocEnumTag extends JSDocTag, Declaration { readonly kind: SyntaxKind.JSDocEnumTag; readonly parent: JSDoc; - readonly typeExpression?: JSDocTypeExpression; + readonly typeExpression: JSDocTypeExpression; } export interface JSDocThisTag extends JSDocTag { readonly kind: SyntaxKind.JSDocThisTag; - readonly typeExpression?: JSDocTypeExpression; + readonly typeExpression: JSDocTypeExpression; } export interface JSDocTemplateTag extends JSDocTag { readonly kind: SyntaxKind.JSDocTemplateTag; readonly constraint: JSDocTypeExpression | undefined; readonly typeParameters: NodeArray; } + export interface JSDocSeeTag extends JSDocTag { + readonly kind: SyntaxKind.JSDocSeeTag; + readonly name?: JSDocNameReference; + } export interface JSDocReturnTag extends JSDocTag { readonly kind: SyntaxKind.JSDocReturnTag; readonly typeExpression?: JSDocTypeExpression; @@ -2053,6 +2079,7 @@ declare namespace ts { * Gets a type checker that can be used to semantically analyze source files in the program. */ getTypeChecker(): TypeChecker; + getTypeCatalog(): readonly Type[]; getNodeCount(): number; getIdentifierCount(): number; getSymbolCount(): number; @@ -2159,7 +2186,7 @@ declare namespace ts { * This is necessary as an identifier in short-hand property assignment can contains two meaning: property name and property value. */ getShorthandAssignmentValueSymbol(location: Node): Symbol | undefined; - getExportSpecifierLocalTargetSymbol(location: ExportSpecifier): Symbol | undefined; + getExportSpecifierLocalTargetSymbol(location: ExportSpecifier | Identifier): Symbol | undefined; /** * If a symbol is a local symbol with an associated exported symbol, returns the exported symbol. * Otherwise returns its input. @@ -2180,6 +2207,7 @@ declare namespace ts { getFullyQualifiedName(symbol: Symbol): string; getAugmentedPropertiesOfType(type: Type): Symbol[]; getRootSymbols(symbol: Symbol): readonly Symbol[]; + getSymbolOfExpando(node: Node, allowDeclaration: boolean): Symbol | undefined; getContextualType(node: Expression): Type | undefined; /** * returns unknownSignature in the case of an error. @@ -2450,11 +2478,13 @@ declare namespace ts { Conditional = 16777216, Substitution = 33554432, NonPrimitive = 67108864, + TemplateLiteral = 134217728, + StringMapping = 268435456, Literal = 2944, Unit = 109440, StringOrNumberLiteral = 384, PossiblyFalsy = 117724, - StringLike = 132, + StringLike = 402653316, NumberLike = 296, BigIntLike = 2112, BooleanLike = 528, @@ -2465,10 +2495,10 @@ declare namespace ts { StructuredType = 3670016, TypeVariable = 8650752, InstantiableNonPrimitive = 58982400, - InstantiablePrimitive = 4194304, - Instantiable = 63176704, - StructuredOrInstantiable = 66846720, - Narrowable = 133970943, + InstantiablePrimitive = 406847488, + Instantiable = 465829888, + StructuredOrInstantiable = 469499904, + Narrowable = 536624127, } export type DestructuringPattern = BindingPattern | ObjectLiteralExpression | ArrayLiteralExpression; export interface Type { @@ -2605,8 +2635,6 @@ declare namespace ts { node: ConditionalTypeNode; checkType: Type; extendsType: Type; - trueType: Type; - falseType: Type; isDistributive: boolean; inferTypeParameters?: TypeParameter[]; outerTypeParameters?: TypeParameter[]; @@ -2621,6 +2649,14 @@ declare namespace ts { resolvedTrueType: Type; resolvedFalseType: Type; } + export interface TemplateLiteralType extends InstantiableType { + texts: readonly string[]; + types: readonly Type[]; + } + export interface StringMappingType extends InstantiableType { + symbol: Symbol; + type: Type; + } export interface SubstitutionType extends InstantiableType { baseType: Type; substitute: Type; @@ -2645,16 +2681,17 @@ declare namespace ts { } export enum InferencePriority { NakedTypeVariable = 1, - HomomorphicMappedType = 2, - PartialHomomorphicMappedType = 4, - MappedTypeConstraint = 8, - ContravariantConditional = 16, - ReturnType = 32, - LiteralKeyof = 64, - NoConstraints = 128, - AlwaysStrict = 256, - MaxValue = 512, - PriorityImpliesCombination = 104, + SpeculativeTuple = 2, + HomomorphicMappedType = 4, + PartialHomomorphicMappedType = 8, + MappedTypeConstraint = 16, + ContravariantConditional = 32, + ReturnType = 64, + LiteralKeyof = 128, + NoConstraints = 256, + AlwaysStrict = 512, + MaxValue = 1024, + PriorityImpliesCombination = 208, Circularity = -1 } /** @deprecated Use FileExtensionInfo instead. */ @@ -2753,6 +2790,7 @@ declare namespace ts { allowUnusedLabels?: boolean; alwaysStrict?: boolean; baseUrl?: string; + bundledPackageName?: string; charset?: string; checkJs?: boolean; declaration?: boolean; @@ -2762,6 +2800,7 @@ declare namespace ts { disableSizeLimit?: boolean; disableSourceOfProjectReferenceRedirect?: boolean; disableSolutionSearching?: boolean; + disableReferencedProjectLoad?: boolean; downlevelIteration?: boolean; emitBOM?: boolean; emitDecoratorMetadata?: boolean; @@ -2796,6 +2835,7 @@ declare namespace ts { assumeChangesOnlyAffectDirectDependencies?: boolean; noLib?: boolean; noResolve?: boolean; + noUncheckedIndexedAccess?: boolean; out?: string; outDir?: string; outFile?: string; @@ -2806,6 +2846,7 @@ declare namespace ts { reactNamespace?: string; jsxFactory?: string; jsxFragmentFactory?: string; + jsxImportSource?: string; composite?: boolean; incremental?: boolean; tsBuildInfoFile?: string; @@ -2866,7 +2907,9 @@ declare namespace ts { None = 0, Preserve = 1, React = 2, - ReactNative = 3 + ReactNative = 3, + ReactJSX = 4, + ReactJSXDev = 5 } export enum ImportsNotUsedAsValues { Remove = 0, @@ -3176,6 +3219,8 @@ declare namespace ts { updateConstructSignature(node: ConstructSignatureDeclaration, typeParameters: NodeArray | undefined, parameters: NodeArray, type: TypeNode | undefined): ConstructSignatureDeclaration; createIndexSignature(decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; updateIndexSignature(node: IndexSignatureDeclaration, decorators: readonly Decorator[] | undefined, modifiers: readonly Modifier[] | undefined, parameters: readonly ParameterDeclaration[], type: TypeNode): IndexSignatureDeclaration; + createTemplateLiteralTypeSpan(type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan; + updateTemplateLiteralTypeSpan(node: TemplateLiteralTypeSpan, type: TypeNode, literal: TemplateMiddle | TemplateTail): TemplateLiteralTypeSpan; createKeywordTypeNode(kind: TKind): KeywordTypeNode; createTypePredicateNode(assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode | string, type: TypeNode | undefined): TypePredicateNode; updateTypePredicateNode(node: TypePredicateNode, assertsModifier: AssertsKeyword | undefined, parameterName: Identifier | ThisTypeNode, type: TypeNode | undefined): TypePredicateNode; @@ -3216,10 +3261,12 @@ declare namespace ts { updateTypeOperatorNode(node: TypeOperatorNode, type: TypeNode): TypeOperatorNode; createIndexedAccessTypeNode(objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; updateIndexedAccessTypeNode(node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode): IndexedAccessTypeNode; - createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; - updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; + createMappedTypeNode(readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; + updateMappedTypeNode(node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined): MappedTypeNode; createLiteralTypeNode(literal: LiteralTypeNode["literal"]): LiteralTypeNode; updateLiteralTypeNode(node: LiteralTypeNode, literal: LiteralTypeNode["literal"]): LiteralTypeNode; + createTemplateLiteralType(head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; + updateTemplateLiteralType(node: TemplateLiteralTypeNode, head: TemplateHead, templateSpans: readonly TemplateLiteralTypeSpan[]): TemplateLiteralTypeNode; createObjectBindingPattern(elements: readonly BindingElement[]): ObjectBindingPattern; updateObjectBindingPattern(node: ObjectBindingPattern, elements: readonly BindingElement[]): ObjectBindingPattern; createArrayBindingPattern(elements: readonly ArrayBindingElement[]): ArrayBindingPattern; @@ -3399,6 +3446,8 @@ declare namespace ts { updateJSDocNamepathType(node: JSDocNamepathType, type: TypeNode): JSDocNamepathType; createJSDocTypeExpression(type: TypeNode): JSDocTypeExpression; updateJSDocTypeExpression(node: JSDocTypeExpression, type: TypeNode): JSDocTypeExpression; + createJSDocNameReference(name: EntityName): JSDocNameReference; + updateJSDocNameReference(node: JSDocNameReference, name: EntityName): JSDocNameReference; createJSDocTypeLiteral(jsDocPropertyTags?: readonly JSDocPropertyLikeTag[], isArrayType?: boolean): JSDocTypeLiteral; updateJSDocTypeLiteral(node: JSDocTypeLiteral, jsDocPropertyTags: readonly JSDocPropertyLikeTag[] | undefined, isArrayType: boolean | undefined): JSDocTypeLiteral; createJSDocSignature(typeParameters: readonly JSDocTemplateTag[] | undefined, parameters: readonly JSDocParameterTag[], type?: JSDocReturnTag): JSDocSignature; @@ -3413,11 +3462,13 @@ declare namespace ts { updateJSDocPropertyTag(node: JSDocPropertyTag, tagName: Identifier | undefined, name: EntityName, isBracketed: boolean, typeExpression: JSDocTypeExpression | undefined, isNameFirst: boolean, comment: string | undefined): JSDocPropertyTag; createJSDocTypeTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocTypeTag; updateJSDocTypeTag(node: JSDocTypeTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocTypeTag; + createJSDocSeeTag(tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string): JSDocSeeTag; + updateJSDocSeeTag(node: JSDocSeeTag, tagName: Identifier | undefined, nameExpression: JSDocNameReference | undefined, comment?: string): JSDocSeeTag; createJSDocReturnTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocReturnTag; updateJSDocReturnTag(node: JSDocReturnTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocReturnTag; - createJSDocThisTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocThisTag; + createJSDocThisTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocThisTag; updateJSDocThisTag(node: JSDocThisTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression | undefined, comment: string | undefined): JSDocThisTag; - createJSDocEnumTag(tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression, comment?: string): JSDocEnumTag; + createJSDocEnumTag(tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string): JSDocEnumTag; updateJSDocEnumTag(node: JSDocEnumTag, tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment: string | undefined): JSDocEnumTag; createJSDocCallbackTag(tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName?: Identifier | JSDocNamespaceDeclaration, comment?: string): JSDocCallbackTag; updateJSDocCallbackTag(node: JSDocCallbackTag, tagName: Identifier | undefined, typeExpression: JSDocSignature, fullName: Identifier | JSDocNamespaceDeclaration | undefined, comment: string | undefined): JSDocCallbackTag; @@ -3816,7 +3867,7 @@ declare namespace ts { readonly importModuleSpecifierEnding?: "auto" | "minimal" | "index" | "js"; readonly allowTextChangesInNewFiles?: boolean; readonly providePrefixAndSuffixTextForRename?: boolean; - readonly includePackageJsonAutoImports?: "exclude-dev" | "all" | "none"; + readonly includePackageJsonAutoImports?: "auto" | "on" | "off"; readonly provideRefactorNotApplicableReason?: boolean; } /** Represents a bigint literal value without requiring bigint support */ @@ -4000,6 +4051,14 @@ declare namespace ts { function getOriginalNode(node: Node, nodeTest: (node: Node) => node is T): T; function getOriginalNode(node: Node | undefined): Node | undefined; function getOriginalNode(node: Node | undefined, nodeTest: (node: Node | undefined) => node is T): T | undefined; + /** + * Iterates through the parent chain of a node and performs the callback on each parent until the callback + * returns a truthy value, then returns that value. + * If no such value is found, it applies the callback until the parent pointer is undefined or the callback returns "quit" + * At that point findAncestor returns undefined. + */ + function findAncestor(node: Node | undefined, callback: (element: Node) => element is T): T | undefined; + function findAncestor(node: Node | undefined, callback: (element: Node) => boolean | "quit"): Node | undefined; /** * Gets a value indicating whether a node originated in the parse tree. * @@ -4304,6 +4363,7 @@ declare namespace ts { function isTypeLiteralNode(node: Node): node is TypeLiteralNode; function isArrayTypeNode(node: Node): node is ArrayTypeNode; function isTupleTypeNode(node: Node): node is TupleTypeNode; + function isNamedTupleMember(node: Node): node is NamedTupleMember; function isOptionalTypeNode(node: Node): node is OptionalTypeNode; function isRestTypeNode(node: Node): node is RestTypeNode; function isUnionTypeNode(node: Node): node is UnionTypeNode; @@ -4317,6 +4377,7 @@ declare namespace ts { function isMappedTypeNode(node: Node): node is MappedTypeNode; function isLiteralTypeNode(node: Node): node is LiteralTypeNode; function isImportTypeNode(node: Node): node is ImportTypeNode; + function isTemplateLiteralTypeSpan(node: Node): node is TemplateLiteralTypeSpan; function isObjectBindingPattern(node: Node): node is ObjectBindingPattern; function isArrayBindingPattern(node: Node): node is ArrayBindingPattern; function isBindingElement(node: Node): node is BindingElement; @@ -4421,6 +4482,7 @@ declare namespace ts { function isBundle(node: Node): node is Bundle; function isUnparsedSource(node: Node): node is UnparsedSource; function isJSDocTypeExpression(node: Node): node is JSDocTypeExpression; + function isJSDocNameReference(node: Node): node is JSDocNameReference; function isJSDocAllType(node: Node): node is JSDocAllType; function isJSDocUnknownType(node: Node): node is JSDocUnknownType; function isJSDocNullableType(node: Node): node is JSDocNullableType; @@ -5312,6 +5374,11 @@ declare namespace ts { kind: "UpdateGraph" | "CreatePackageJsonAutoImportProvider"; durationMs: number; } + enum LanguageServiceMode { + Semantic = 0, + PartialSemantic = 1, + Syntactic = 2 + } interface LanguageServiceHost extends GetEffectiveTypeRootsHost { getCompilationSettings(): CompilerOptions; getNewLine?(): string; @@ -5349,6 +5416,10 @@ declare namespace ts { type WithMetadata = T & { metadata?: unknown; }; + enum SemanticClassificationFormat { + Original = "original", + TwentyTwenty = "2020" + } interface LanguageService { /** This is used as a part of restarting the language service. */ cleanupSemanticCache(): void; @@ -5400,10 +5471,22 @@ declare namespace ts { getCompilerOptionsDiagnostics(): Diagnostic[]; /** @deprecated Use getEncodedSyntacticClassifications instead. */ getSyntacticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getSyntacticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; /** @deprecated Use getEncodedSemanticClassifications instead. */ getSemanticClassifications(fileName: string, span: TextSpan): ClassifiedSpan[]; + getSemanticClassifications(fileName: string, span: TextSpan, format: SemanticClassificationFormat): ClassifiedSpan[] | ClassifiedSpan2020[]; + /** Encoded as triples of [start, length, ClassificationType]. */ getEncodedSyntacticClassifications(fileName: string, span: TextSpan): Classifications; - getEncodedSemanticClassifications(fileName: string, span: TextSpan): Classifications; + /** + * Gets semantic highlights information for a particular file. Has two formats, an older + * version used by VS and a format used by VS Code. + * + * @param fileName The path to the file + * @param position A text span to return results within + * @param format Which format to use, defaults to "original" + * @returns a number array encoded as triples of [start, length, ClassificationType, ...]. + */ + getEncodedSemanticClassifications(fileName: string, span: TextSpan, format?: SemanticClassificationFormat): Classifications; /** * Gets completion entries at a particular position in a file. * @@ -5562,6 +5645,10 @@ declare namespace ts { textSpan: TextSpan; classificationType: ClassificationTypeNames; } + interface ClassifiedSpan2020 { + textSpan: TextSpan; + classificationType: number; + } /** * Navigation bar interface designed for visual studio's dual-column layout. * This does not form a proper tree. @@ -5958,6 +6045,12 @@ declare namespace ts { /** Not true for all global completions. This will be true if the enclosing scope matches a few syntax kinds. See `isSnippetScope`. */ isGlobalCompletion: boolean; isMemberCompletion: boolean; + /** + * In the absence of `CompletionEntry["replacementSpan"], the editor may choose whether to use + * this span or its default one. If `CompletionEntry["replacementSpan"]` is defined, that span + * must be used to commit that completion entry. + */ + optionalReplacementSpan?: TextSpan; /** * true when the current location also allows for a new identifier */ @@ -6323,7 +6416,7 @@ declare namespace ts { function getSupportedCodeFixes(): string[]; function createLanguageServiceSourceFile(fileName: string, scriptSnapshot: IScriptSnapshot, scriptTarget: ScriptTarget, version: string, setNodeParents: boolean, scriptKind?: ScriptKind): SourceFile; function updateLanguageServiceSourceFile(sourceFile: SourceFile, scriptSnapshot: IScriptSnapshot, version: string, textChangeRange: TextChangeRange | undefined, aggressiveChecks?: boolean): SourceFile; - function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnly?: boolean): LanguageService; + function createLanguageService(host: LanguageServiceHost, documentRegistry?: DocumentRegistry, syntaxOnlyOrLanguageServiceMode?: boolean | LanguageServiceMode): LanguageService; /** * Get the path of the default library files (lib.d.ts) as distributed with the typescript * node package. @@ -6501,9 +6594,9 @@ declare namespace ts { /** @deprecated Use `factory.updateIndexedAccessTypeNode` or the factory supplied by your transformation context instead. */ const updateIndexedAccessTypeNode: (node: IndexedAccessTypeNode, objectType: TypeNode, indexType: TypeNode) => IndexedAccessTypeNode; /** @deprecated Use `factory.createMappedTypeNode` or the factory supplied by your transformation context instead. */ - const createMappedTypeNode: (readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode; + const createMappedTypeNode: (readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode; /** @deprecated Use `factory.updateMappedTypeNode` or the factory supplied by your transformation context instead. */ - const updateMappedTypeNode: (node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode; + const updateMappedTypeNode: (node: MappedTypeNode, readonlyToken: ReadonlyKeyword | PlusToken | MinusToken | undefined, typeParameter: TypeParameterDeclaration, nameType: TypeNode | undefined, questionToken: QuestionToken | PlusToken | MinusToken | undefined, type: TypeNode | undefined) => MappedTypeNode; /** @deprecated Use `factory.createLiteralTypeNode` or the factory supplied by your transformation context instead. */ const createLiteralTypeNode: (literal: LiteralExpression | TrueLiteral | FalseLiteral | PrefixUnaryExpression | NullLiteral) => LiteralTypeNode; /** @deprecated Use `factory.updateLiteralTypeNode` or the factory supplied by your transformation context instead. */ @@ -6809,7 +6902,7 @@ declare namespace ts { /** @deprecated Use `factory.createJSDocReturnTag` or the factory supplied by your transformation context instead. */ const createJSDocReturnTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocReturnTag; /** @deprecated Use `factory.createJSDocThisTag` or the factory supplied by your transformation context instead. */ - const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocThisTag; + const createJSDocThisTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | undefined) => JSDocThisTag; /** @deprecated Use `factory.createJSDocComment` or the factory supplied by your transformation context instead. */ const createJSDocComment: (comment?: string | undefined, tags?: readonly JSDocTag[] | undefined) => JSDoc; /** @deprecated Use `factory.createJSDocParameterTag` or the factory supplied by your transformation context instead. */ @@ -6821,7 +6914,7 @@ declare namespace ts { readonly expression: Identifier | PropertyAccessEntityNameExpression; }, comment?: string | undefined) => JSDocAugmentsTag; /** @deprecated Use `factory.createJSDocEnumTag` or the factory supplied by your transformation context instead. */ - const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression?: JSDocTypeExpression | undefined, comment?: string | undefined) => JSDocEnumTag; + const createJSDocEnumTag: (tagName: Identifier | undefined, typeExpression: JSDocTypeExpression, comment?: string | undefined) => JSDocEnumTag; /** @deprecated Use `factory.createJSDocTemplateTag` or the factory supplied by your transformation context instead. */ const createJSDocTemplateTag: (tagName: Identifier | undefined, constraint: JSDocTypeExpression | undefined, typeParameters: readonly TypeParameterDeclaration[], comment?: string | undefined) => JSDocTemplateTag; /** @deprecated Use `factory.createJSDocTypedefTag` or the factory supplied by your transformation context instead. */ diff --git a/tests/baselines/reference/arrayFrom.types b/tests/baselines/reference/arrayFrom.types index 69ac2547465..8c755a6366f 100644 --- a/tests/baselines/reference/arrayFrom.types +++ b/tests/baselines/reference/arrayFrom.types @@ -29,7 +29,7 @@ const inputALike: ArrayLike = { length: 0 }; const inputARand = getEither(inputA, inputALike); >inputARand : ArrayLike | Iterable >getEither(inputA, inputALike) : ArrayLike | Iterable ->getEither : (in1: Iterable, in2: ArrayLike) => Iterable | ArrayLike +>getEither : (in1: Iterable, in2: ArrayLike) => ArrayLike | Iterable >inputA : A[] >inputALike : ArrayLike @@ -161,12 +161,12 @@ const result11: B[] = Array.from(inputASet, ({ a }): B => ({ b: a })); // the ?: as always taking the false branch, narrowing to ArrayLike, // even when the type is written as : Iterable|ArrayLike function getEither (in1: Iterable, in2: ArrayLike) { ->getEither : (in1: Iterable, in2: ArrayLike) => Iterable | ArrayLike +>getEither : (in1: Iterable, in2: ArrayLike) => ArrayLike | Iterable >in1 : Iterable >in2 : ArrayLike return Math.random() > 0.5 ? in1 : in2; ->Math.random() > 0.5 ? in1 : in2 : Iterable | ArrayLike +>Math.random() > 0.5 ? in1 : in2 : ArrayLike | Iterable >Math.random() > 0.5 : boolean >Math.random() : number >Math.random : () => number diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt index 42a84492202..ef0a9267441 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.errors.txt @@ -11,8 +11,8 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(34,5): error TS2741: Property ''1.'' is missing in type 'S' but required in type '{ '1.': string; bar?: string; }'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(35,5): error TS2741: Property ''1.'' is missing in type 'S2' but required in type '{ '1.': string; bar?: string; }'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(36,5): error TS2741: Property ''1.'' is missing in type '{ '1.0': string; }' but required in type '{ '1.': string; bar?: string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ '1.0': string; }'. -tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type '{ 1: string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(38,5): error TS2741: Property ''1.0'' is missing in type '{ '1': string; }' but required in type '{ '1.0': string; }'. +tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(39,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type '{ '1': string; }'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(42,5): error TS2741: Property ''1.0'' is missing in type 'T' but required in type '{ '1.0': string; }'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(65,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts(71,5): error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type 'S2'. @@ -108,11 +108,11 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme a2 = b2; ~~ -!!! error TS2741: Property ''1.0'' is missing in type '{ 1: string; }' but required in type '{ '1.0': string; }'. +!!! error TS2741: Property ''1.0'' is missing in type '{ '1': string; }' but required in type '{ '1.0': string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:18:16: ''1.0'' is declared here. b2 = a2; ~~ -!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type '{ 1: string; }'. +!!! error TS2741: Property ''1'' is missing in type '{ '1.0': string; }' but required in type '{ '1': string; }'. !!! related TS2728 tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithObjectMembersStringNumericNames.ts:19:16: ''1'' is declared here. a2 = b; // ok a2 = t2; // ok diff --git a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.types b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.types index 6f10223d69c..be89c806241 100644 --- a/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.types +++ b/tests/baselines/reference/assignmentCompatWithObjectMembersStringNumericNames.types @@ -50,8 +50,8 @@ module JustStrings { >'' : "" var b2 = { '1': '' }; ->b2 : { 1: string; } ->{ '1': '' } : { 1: string; } +>b2 : { '1': string; } +>{ '1': '' } : { '1': string; } >'1' : string >'' : "" @@ -126,13 +126,13 @@ module JustStrings { >a2 : { '1.0': string; } a2 = b2; ->a2 = b2 : { 1: string; } +>a2 = b2 : { '1': string; } >a2 : { '1.0': string; } ->b2 : { 1: string; } +>b2 : { '1': string; } b2 = a2; >b2 = a2 : { '1.0': string; } ->b2 : { 1: string; } +>b2 : { '1': string; } >a2 : { '1.0': string; } a2 = b; // ok diff --git a/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt b/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt index 3773229f516..24f06462b8a 100644 --- a/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithOverloads.errors.txt @@ -6,8 +6,10 @@ tests/cases/compiler/assignmentCompatWithOverloads.ts(19,1): error TS2322: Type tests/cases/compiler/assignmentCompatWithOverloads.ts(21,1): error TS2322: Type '{ (x: string): string; (x: number): number; }' is not assignable to type '(s1: string) => number'. Type 'string' is not assignable to type 'number'. tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2322: Type 'typeof C' is not assignable to type 'new (x: number) => void'. - Types of parameters 'x' and 'x' are incompatible. - Type 'number' is not assignable to type 'string'. + Types of construct signatures are incompatible. + Type 'new (x: string) => C' is not assignable to type 'new (x: number) => void'. + Types of parameters 'x' and 'x' are incompatible. + Type 'number' is not assignable to type 'string'. ==== tests/cases/compiler/assignmentCompatWithOverloads.ts (4 errors) ==== @@ -53,5 +55,7 @@ tests/cases/compiler/assignmentCompatWithOverloads.ts(30,1): error TS2322: Type d = C; // Error ~ !!! error TS2322: Type 'typeof C' is not assignable to type 'new (x: number) => void'. -!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. -!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file +!!! error TS2322: Types of construct signatures are incompatible. +!!! error TS2322: Type 'new (x: string) => C' is not assignable to type 'new (x: number) => void'. +!!! error TS2322: Types of parameters 'x' and 'x' are incompatible. +!!! error TS2322: Type 'number' is not assignable to type 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability44.errors.txt b/tests/baselines/reference/assignmentCompatability44.errors.txt new file mode 100644 index 00000000000..65cd1826acc --- /dev/null +++ b/tests/baselines/reference/assignmentCompatability44.errors.txt @@ -0,0 +1,16 @@ +tests/cases/compiler/assignmentCompatability44.ts(5,7): error TS2322: Type 'typeof Foo' is not assignable to type 'new () => Foo'. + Types of construct signatures are incompatible. + Type 'new (x: number) => Foo' is not assignable to type 'new () => Foo'. + + +==== tests/cases/compiler/assignmentCompatability44.ts (1 errors) ==== + class Foo { + constructor(x: number) {} + } + + const foo: { new(): Foo } = Foo; + ~~~ +!!! error TS2322: Type 'typeof Foo' is not assignable to type 'new () => Foo'. +!!! error TS2322: Types of construct signatures are incompatible. +!!! error TS2322: Type 'new (x: number) => Foo' is not assignable to type 'new () => Foo'. + \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability44.js b/tests/baselines/reference/assignmentCompatability44.js new file mode 100644 index 00000000000..ccdbf0827c3 --- /dev/null +++ b/tests/baselines/reference/assignmentCompatability44.js @@ -0,0 +1,15 @@ +//// [assignmentCompatability44.ts] +class Foo { + constructor(x: number) {} +} + +const foo: { new(): Foo } = Foo; + + +//// [assignmentCompatability44.js] +var Foo = /** @class */ (function () { + function Foo(x) { + } + return Foo; +}()); +var foo = Foo; diff --git a/tests/baselines/reference/assignmentCompatability44.symbols b/tests/baselines/reference/assignmentCompatability44.symbols new file mode 100644 index 00000000000..182bb1b0490 --- /dev/null +++ b/tests/baselines/reference/assignmentCompatability44.symbols @@ -0,0 +1,13 @@ +=== tests/cases/compiler/assignmentCompatability44.ts === +class Foo { +>Foo : Symbol(Foo, Decl(assignmentCompatability44.ts, 0, 0)) + + constructor(x: number) {} +>x : Symbol(x, Decl(assignmentCompatability44.ts, 1, 16)) +} + +const foo: { new(): Foo } = Foo; +>foo : Symbol(foo, Decl(assignmentCompatability44.ts, 4, 5)) +>Foo : Symbol(Foo, Decl(assignmentCompatability44.ts, 0, 0)) +>Foo : Symbol(Foo, Decl(assignmentCompatability44.ts, 0, 0)) + diff --git a/tests/baselines/reference/assignmentCompatability44.types b/tests/baselines/reference/assignmentCompatability44.types new file mode 100644 index 00000000000..a62bf37184b --- /dev/null +++ b/tests/baselines/reference/assignmentCompatability44.types @@ -0,0 +1,12 @@ +=== tests/cases/compiler/assignmentCompatability44.ts === +class Foo { +>Foo : Foo + + constructor(x: number) {} +>x : number +} + +const foo: { new(): Foo } = Foo; +>foo : new () => Foo +>Foo : typeof Foo + diff --git a/tests/baselines/reference/assignmentCompatability45.errors.txt b/tests/baselines/reference/assignmentCompatability45.errors.txt new file mode 100644 index 00000000000..7a01b39841b --- /dev/null +++ b/tests/baselines/reference/assignmentCompatability45.errors.txt @@ -0,0 +1,18 @@ +tests/cases/compiler/assignmentCompatability45.ts(7,7): error TS2322: Type 'typeof B' is not assignable to type 'typeof A'. + Types of construct signatures are incompatible. + Type 'new (x: number) => B' is not assignable to type 'new () => A'. + + +==== tests/cases/compiler/assignmentCompatability45.ts (1 errors) ==== + abstract class A {} + class B extends A { + constructor(x: number) { + super(); + } + } + const b: typeof A = B; + ~ +!!! error TS2322: Type 'typeof B' is not assignable to type 'typeof A'. +!!! error TS2322: Types of construct signatures are incompatible. +!!! error TS2322: Type 'new (x: number) => B' is not assignable to type 'new () => A'. + \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability45.js b/tests/baselines/reference/assignmentCompatability45.js new file mode 100644 index 00000000000..559714d1f40 --- /dev/null +++ b/tests/baselines/reference/assignmentCompatability45.js @@ -0,0 +1,37 @@ +//// [assignmentCompatability45.ts] +abstract class A {} +class B extends A { + constructor(x: number) { + super(); + } +} +const b: typeof A = B; + + +//// [assignmentCompatability45.js] +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +var A = /** @class */ (function () { + function A() { + } + return A; +}()); +var B = /** @class */ (function (_super) { + __extends(B, _super); + function B(x) { + return _super.call(this) || this; + } + return B; +}(A)); +var b = B; diff --git a/tests/baselines/reference/assignmentCompatability45.symbols b/tests/baselines/reference/assignmentCompatability45.symbols new file mode 100644 index 00000000000..009e89cd044 --- /dev/null +++ b/tests/baselines/reference/assignmentCompatability45.symbols @@ -0,0 +1,20 @@ +=== tests/cases/compiler/assignmentCompatability45.ts === +abstract class A {} +>A : Symbol(A, Decl(assignmentCompatability45.ts, 0, 0)) + +class B extends A { +>B : Symbol(B, Decl(assignmentCompatability45.ts, 0, 19)) +>A : Symbol(A, Decl(assignmentCompatability45.ts, 0, 0)) + + constructor(x: number) { +>x : Symbol(x, Decl(assignmentCompatability45.ts, 2, 16)) + + super(); +>super : Symbol(A, Decl(assignmentCompatability45.ts, 0, 0)) + } +} +const b: typeof A = B; +>b : Symbol(b, Decl(assignmentCompatability45.ts, 6, 5)) +>A : Symbol(A, Decl(assignmentCompatability45.ts, 0, 0)) +>B : Symbol(B, Decl(assignmentCompatability45.ts, 0, 19)) + diff --git a/tests/baselines/reference/assignmentCompatability45.types b/tests/baselines/reference/assignmentCompatability45.types new file mode 100644 index 00000000000..c095da8e860 --- /dev/null +++ b/tests/baselines/reference/assignmentCompatability45.types @@ -0,0 +1,21 @@ +=== tests/cases/compiler/assignmentCompatability45.ts === +abstract class A {} +>A : A + +class B extends A { +>B : B +>A : A + + constructor(x: number) { +>x : number + + super(); +>super() : void +>super : typeof A + } +} +const b: typeof A = B; +>b : typeof A +>A : typeof A +>B : typeof B + diff --git a/tests/baselines/reference/assignmentIndexedToPrimitives.errors.txt b/tests/baselines/reference/assignmentIndexedToPrimitives.errors.txt index 11d5839042a..88c822f6dcb 100644 --- a/tests/baselines/reference/assignmentIndexedToPrimitives.errors.txt +++ b/tests/baselines/reference/assignmentIndexedToPrimitives.errors.txt @@ -8,7 +8,7 @@ tests/cases/compiler/assignmentIndexedToPrimitives.ts(8,7): error TS2322: Type ' tests/cases/compiler/assignmentIndexedToPrimitives.ts(9,7): error TS2322: Type 'string[]' is not assignable to type '"01"'. tests/cases/compiler/assignmentIndexedToPrimitives.ts(11,7): error TS2322: Type '{ 0: number; }' is not assignable to type 'number'. tests/cases/compiler/assignmentIndexedToPrimitives.ts(13,7): error TS2322: Type '{ 0: number; }' is not assignable to type 'string'. -tests/cases/compiler/assignmentIndexedToPrimitives.ts(14,7): error TS2322: Type '{ 0: number; }' is not assignable to type 'string'. +tests/cases/compiler/assignmentIndexedToPrimitives.ts(14,7): error TS2322: Type '{ "0": number; }' is not assignable to type 'string'. tests/cases/compiler/assignmentIndexedToPrimitives.ts(15,7): error TS2322: Type '{ 0: string; }' is not assignable to type 'string'. @@ -48,7 +48,7 @@ tests/cases/compiler/assignmentIndexedToPrimitives.ts(15,7): error TS2322: Type !!! error TS2322: Type '{ 0: number; }' is not assignable to type 'string'. const so2: string = { "0": 1 }; ~~~ -!!! error TS2322: Type '{ 0: number; }' is not assignable to type 'string'. +!!! error TS2322: Type '{ "0": number; }' is not assignable to type 'string'. const so3: string = { 0: "1" }; ~~~ !!! error TS2322: Type '{ 0: string; }' is not assignable to type 'string'. diff --git a/tests/baselines/reference/assignmentIndexedToPrimitives.types b/tests/baselines/reference/assignmentIndexedToPrimitives.types index b380008f78d..7c36c89b1e9 100644 --- a/tests/baselines/reference/assignmentIndexedToPrimitives.types +++ b/tests/baselines/reference/assignmentIndexedToPrimitives.types @@ -56,7 +56,7 @@ const so1: string = { 0: 1 }; const so2: string = { "0": 1 }; >so2 : string ->{ "0": 1 } : { 0: number; } +>{ "0": 1 } : { "0": number; } >"0" : number >1 : 1 diff --git a/tests/baselines/reference/asyncArrowFunction11_es5.types b/tests/baselines/reference/asyncArrowFunction11_es5.types index 7fd9d53af72..ac144c61b8b 100644 --- a/tests/baselines/reference/asyncArrowFunction11_es5.types +++ b/tests/baselines/reference/asyncArrowFunction11_es5.types @@ -11,9 +11,9 @@ class A { await Promise.resolve(); >await Promise.resolve() : void >Promise.resolve() : Promise ->Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise.resolve : { (): Promise; (value: T | PromiseLike): Promise; } >Promise : PromiseConstructor ->resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>resolve : { (): Promise; (value: T | PromiseLike): Promise; } const obj = { ["a"]: () => this }; // computed property name after `await` triggers case >obj : { a: () => this; } diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.errors.txt b/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.errors.txt index 25392e59232..62bb6c1d4d5 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.errors.txt +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es2017.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts(1,27): error TS2307: Cannot find module 'missing' or its corresponding type declarations. +tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts(1,27): error TS2792: Cannot find module 'missing'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/conformance/async/es2017/asyncAwaitIsolatedModules_es2017.ts (1 errors) ==== import { MyPromise } from "missing"; ~~~~~~~~~ -!!! error TS2307: Cannot find module 'missing' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'missing'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? declare var p: Promise; declare var mp: MyPromise; diff --git a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt index ddd91b09afb..1088f4978bd 100644 --- a/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt +++ b/tests/baselines/reference/asyncAwaitIsolatedModules_es6.errors.txt @@ -1,10 +1,10 @@ -tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts(1,27): error TS2307: Cannot find module 'missing' or its corresponding type declarations. +tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts(1,27): error TS2792: Cannot find module 'missing'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/conformance/async/es6/asyncAwaitIsolatedModules_es6.ts (1 errors) ==== import { MyPromise } from "missing"; ~~~~~~~~~ -!!! error TS2307: Cannot find module 'missing' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'missing'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? declare var p: Promise; declare var mp: MyPromise; diff --git a/tests/baselines/reference/asyncAwaitNestedClasses_es5.types b/tests/baselines/reference/asyncAwaitNestedClasses_es5.types index 40f0e5ce9b9..67e4ca647d7 100644 --- a/tests/baselines/reference/asyncAwaitNestedClasses_es5.types +++ b/tests/baselines/reference/asyncAwaitNestedClasses_es5.types @@ -14,10 +14,10 @@ class A { return new Promise((resolve) => { resolve(null); }); >new Promise((resolve) => { resolve(null); }) : Promise >Promise : PromiseConstructor ->(resolve) => { resolve(null); } : (resolve: (value?: void | PromiseLike) => void) => void ->resolve : (value?: void | PromiseLike) => void +>(resolve) => { resolve(null); } : (resolve: (value: void | PromiseLike) => void) => void +>resolve : (value: void | PromiseLike) => void >resolve(null) : void ->resolve : (value?: void | PromiseLike) => void +>resolve : (value: void | PromiseLike) => void >null : null } static C = class C { diff --git a/tests/baselines/reference/asyncFunctionReturnType.types b/tests/baselines/reference/asyncFunctionReturnType.types index 9ce665ca870..3c48607ce51 100644 --- a/tests/baselines/reference/asyncFunctionReturnType.types +++ b/tests/baselines/reference/asyncFunctionReturnType.types @@ -44,9 +44,9 @@ async function fIndexedTypeForPromiseOfStringProp(obj: Obj): PromisePromise.resolve(obj.stringProp) : Promise ->Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise.resolve : { (): Promise; (value: T | PromiseLike): Promise; } >Promise : PromiseConstructor ->resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>resolve : { (): Promise; (value: T | PromiseLike): Promise; } >obj.stringProp : string >obj : Obj >stringProp : string @@ -58,9 +58,9 @@ async function fIndexedTypeForExplicitPromiseOfStringProp(obj: Obj): Promise(obj.stringProp); >Promise.resolve(obj.stringProp) : Promise ->Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise.resolve : { (): Promise; (value: T | PromiseLike): Promise; } >Promise : PromiseConstructor ->resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>resolve : { (): Promise; (value: T | PromiseLike): Promise; } >obj.stringProp : string >obj : Obj >stringProp : string @@ -82,9 +82,9 @@ async function fIndexedTypeForPromiseOfAnyProp(obj: Obj): PromisePromise.resolve(obj.anyProp) : Promise ->Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise.resolve : { (): Promise; (value: T | PromiseLike): Promise; } >Promise : PromiseConstructor ->resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>resolve : { (): Promise; (value: T | PromiseLike): Promise; } >obj.anyProp : any >obj : Obj >anyProp : any @@ -96,9 +96,9 @@ async function fIndexedTypeForExplicitPromiseOfAnyProp(obj: Obj): Promise(obj.anyProp); >Promise.resolve(obj.anyProp) : Promise ->Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise.resolve : { (): Promise; (value: T | PromiseLike): Promise; } >Promise : PromiseConstructor ->resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>resolve : { (): Promise; (value: T | PromiseLike): Promise; } >obj.anyProp : any >obj : Obj >anyProp : any @@ -120,9 +120,9 @@ async function fGenericIndexedTypeForPromiseOfStringProp(obj: return Promise.resolve(obj.stringProp); >Promise.resolve(obj.stringProp) : Promise ->Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise.resolve : { (): Promise; (value: T | PromiseLike): Promise; } >Promise : PromiseConstructor ->resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>resolve : { (): Promise; (value: T | PromiseLike): Promise; } >obj.stringProp : string >obj : TObj >stringProp : string @@ -134,9 +134,9 @@ async function fGenericIndexedTypeForExplicitPromiseOfStringProp(obj.stringProp); >Promise.resolve(obj.stringProp) : Promise ->Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise.resolve : { (): Promise; (value: T | PromiseLike): Promise; } >Promise : PromiseConstructor ->resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>resolve : { (): Promise; (value: T | PromiseLike): Promise; } >obj.stringProp : string >obj : TObj >stringProp : string @@ -158,9 +158,9 @@ async function fGenericIndexedTypeForPromiseOfAnyProp(obj: TOb return Promise.resolve(obj.anyProp); >Promise.resolve(obj.anyProp) : Promise ->Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise.resolve : { (): Promise; (value: T | PromiseLike): Promise; } >Promise : PromiseConstructor ->resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>resolve : { (): Promise; (value: T | PromiseLike): Promise; } >obj.anyProp : any >obj : TObj >anyProp : any @@ -172,9 +172,9 @@ async function fGenericIndexedTypeForExplicitPromiseOfAnyProp( return Promise.resolve(obj.anyProp); >Promise.resolve(obj.anyProp) : Promise ->Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise.resolve : { (): Promise; (value: T | PromiseLike): Promise; } >Promise : PromiseConstructor ->resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>resolve : { (): Promise; (value: T | PromiseLike): Promise; } >obj.anyProp : any >obj : TObj >anyProp : any @@ -198,9 +198,9 @@ async function fGenericIndexedTypeForPromiseOfKPropPromise.resolve(obj[key]) : Promise ->Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise.resolve : { (): Promise; (value: T | PromiseLike): Promise; } >Promise : PromiseConstructor ->resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>resolve : { (): Promise; (value: T | PromiseLike): Promise; } >obj[key] : TObj[K] >obj : TObj >key : K @@ -213,9 +213,9 @@ async function fGenericIndexedTypeForExplicitPromiseOfKProp(obj[key]); >Promise.resolve(obj[key]) : Promise ->Promise.resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>Promise.resolve : { (): Promise; (value: T | PromiseLike): Promise; } >Promise : PromiseConstructor ->resolve : { (value: T | PromiseLike): Promise; (): Promise; } +>resolve : { (): Promise; (value: T | PromiseLike): Promise; } >obj[key] : TObj[K] >obj : TObj >key : K diff --git a/tests/baselines/reference/badExternalModuleReference.errors.txt b/tests/baselines/reference/badExternalModuleReference.errors.txt index 1133400b65a..b1871dd0d28 100644 --- a/tests/baselines/reference/badExternalModuleReference.errors.txt +++ b/tests/baselines/reference/badExternalModuleReference.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/badExternalModuleReference.ts(1,21): error TS2307: Cannot find module 'garbage' or its corresponding type declarations. +tests/cases/compiler/badExternalModuleReference.ts(1,21): error TS2792: Cannot find module 'garbage'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/badExternalModuleReference.ts (1 errors) ==== import a1 = require("garbage"); ~~~~~~~~~ -!!! error TS2307: Cannot find module 'garbage' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'garbage'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? export declare var a: { test1: a1.connectModule; (): a1.connectExport; diff --git a/tests/baselines/reference/bundledDtsLateExportRenaming.errors.txt b/tests/baselines/reference/bundledDtsLateExportRenaming.errors.txt new file mode 100644 index 00000000000..4f96a9965ae --- /dev/null +++ b/tests/baselines/reference/bundledDtsLateExportRenaming.errors.txt @@ -0,0 +1,30 @@ +error TS1391: The `bundledPackageName` option must be provided when using outFile and node module resolution with declaration emit. + + +!!! error TS1391: The `bundledPackageName` option must be provided when using outFile and node module resolution with declaration emit. +==== tests/cases/compiler/index.ts (0 errors) ==== + export * from "./nested"; + +==== tests/cases/compiler/nested/base.ts (0 errors) ==== + import { B } from "./shared"; + + export function f() { + return new B(); + } + +==== tests/cases/compiler/nested/derived.ts (0 errors) ==== + import { f } from "./base"; + + export function g() { + return f(); + } + +==== tests/cases/compiler/nested/index.ts (0 errors) ==== + export * from "./base"; + + export * from "./derived"; + export * from "./shared"; + +==== tests/cases/compiler/nested/shared.ts (0 errors) ==== + export class B {} + \ No newline at end of file diff --git a/tests/baselines/reference/bundledDtsLateExportRenaming.js b/tests/baselines/reference/bundledDtsLateExportRenaming.js new file mode 100644 index 00000000000..52b642b655e --- /dev/null +++ b/tests/baselines/reference/bundledDtsLateExportRenaming.js @@ -0,0 +1,51 @@ +//// [tests/cases/compiler/bundledDtsLateExportRenaming.ts] //// + +//// [index.ts] +export * from "./nested"; + +//// [base.ts] +import { B } from "./shared"; + +export function f() { + return new B(); +} + +//// [derived.ts] +import { f } from "./base"; + +export function g() { + return f(); +} + +//// [index.ts] +export * from "./base"; + +export * from "./derived"; +export * from "./shared"; + +//// [shared.ts] +export class B {} + + + + +//// [out.d.ts] +declare module "nested/shared" { + export class B { + } +} +declare module "nested/base" { + import { B } from "nested/shared"; + export function f(): B; +} +declare module "nested/derived" { + export function g(): import("nested").B; +} +declare module "nested/index" { + export * from "nested/base"; + export * from "nested/derived"; + export * from "nested/shared"; +} +declare module "index" { + export * from "nested/index"; +} diff --git a/tests/baselines/reference/bundledDtsLateExportRenaming.symbols b/tests/baselines/reference/bundledDtsLateExportRenaming.symbols new file mode 100644 index 00000000000..990b6ebebf7 --- /dev/null +++ b/tests/baselines/reference/bundledDtsLateExportRenaming.symbols @@ -0,0 +1,35 @@ +=== tests/cases/compiler/index.ts === +export * from "./nested"; +No type information for this code. +No type information for this code.=== tests/cases/compiler/nested/base.ts === +import { B } from "./shared"; +>B : Symbol(B, Decl(base.ts, 0, 8)) + +export function f() { +>f : Symbol(f, Decl(base.ts, 0, 29)) + + return new B(); +>B : Symbol(B, Decl(base.ts, 0, 8)) +} + +=== tests/cases/compiler/nested/derived.ts === +import { f } from "./base"; +>f : Symbol(f, Decl(derived.ts, 0, 8)) + +export function g() { +>g : Symbol(g, Decl(derived.ts, 0, 27)) + + return f(); +>f : Symbol(f, Decl(derived.ts, 0, 8)) +} + +=== tests/cases/compiler/nested/index.ts === +export * from "./base"; +No type information for this code. +No type information for this code.export * from "./derived"; +No type information for this code.export * from "./shared"; +No type information for this code. +No type information for this code.=== tests/cases/compiler/nested/shared.ts === +export class B {} +>B : Symbol(B, Decl(shared.ts, 0, 0)) + diff --git a/tests/baselines/reference/bundledDtsLateExportRenaming.types b/tests/baselines/reference/bundledDtsLateExportRenaming.types new file mode 100644 index 00000000000..eacdf182367 --- /dev/null +++ b/tests/baselines/reference/bundledDtsLateExportRenaming.types @@ -0,0 +1,37 @@ +=== tests/cases/compiler/index.ts === +export * from "./nested"; +No type information for this code. +No type information for this code.=== tests/cases/compiler/nested/base.ts === +import { B } from "./shared"; +>B : typeof B + +export function f() { +>f : () => B + + return new B(); +>new B() : B +>B : typeof B +} + +=== tests/cases/compiler/nested/derived.ts === +import { f } from "./base"; +>f : () => import("tests/cases/compiler/index").B + +export function g() { +>g : () => import("tests/cases/compiler/index").B + + return f(); +>f() : import("tests/cases/compiler/index").B +>f : () => import("tests/cases/compiler/index").B +} + +=== tests/cases/compiler/nested/index.ts === +export * from "./base"; +No type information for this code. +No type information for this code.export * from "./derived"; +No type information for this code.export * from "./shared"; +No type information for this code. +No type information for this code.=== tests/cases/compiler/nested/shared.ts === +export class B {} +>B : B + diff --git a/tests/baselines/reference/bundledNodeDTSFailsWithOutFlag.errors.txt b/tests/baselines/reference/bundledNodeDTSFailsWithOutFlag.errors.txt new file mode 100644 index 00000000000..33c7b6a659d --- /dev/null +++ b/tests/baselines/reference/bundledNodeDTSFailsWithOutFlag.errors.txt @@ -0,0 +1,29 @@ +error TS1391: The `bundledPackageName` option must be provided when using outFile and node module resolution with declaration emit. + + +!!! error TS1391: The `bundledPackageName` option must be provided when using outFile and node module resolution with declaration emit. +==== tests/cases/conformance/declarationEmit/index.ts (0 errors) ==== + export * from "./nested"; + +==== tests/cases/conformance/declarationEmit/nested/base.ts (0 errors) ==== + import { B } from "./shared"; + + export function f() { + return new B(); + } + +==== tests/cases/conformance/declarationEmit/nested/derived.ts (0 errors) ==== + import { f } from "./base"; + + export function g() { + return f(); + } + +==== tests/cases/conformance/declarationEmit/nested/index.ts (0 errors) ==== + export * from "./base"; + export * from "./derived"; + export * from "./shared"; + +==== tests/cases/conformance/declarationEmit/nested/shared.ts (0 errors) ==== + export class B {} + \ No newline at end of file diff --git a/tests/baselines/reference/bundledNodeDTSFailsWithOutFlag.js b/tests/baselines/reference/bundledNodeDTSFailsWithOutFlag.js new file mode 100644 index 00000000000..8a778916492 --- /dev/null +++ b/tests/baselines/reference/bundledNodeDTSFailsWithOutFlag.js @@ -0,0 +1,50 @@ +//// [tests/cases/conformance/declarationEmit/bundledNodeDTSFailsWithOutFlag.ts] //// + +//// [index.ts] +export * from "./nested"; + +//// [base.ts] +import { B } from "./shared"; + +export function f() { + return new B(); +} + +//// [derived.ts] +import { f } from "./base"; + +export function g() { + return f(); +} + +//// [index.ts] +export * from "./base"; +export * from "./derived"; +export * from "./shared"; + +//// [shared.ts] +export class B {} + + + + +//// [out.d.ts] +declare module "nested/shared" { + export class B { + } +} +declare module "nested/base" { + import { B } from "nested/shared"; + export function f(): B; +} +declare module "nested/derived" { + export function g(): import("nested").B; +} +declare module "nested/index" { + export * from "nested/base"; + export * from "nested/derived"; + export * from "nested/shared"; +} +declare module "index" { + export * from "nested/index"; +} diff --git a/tests/baselines/reference/bundledNodeDTSFailsWithOutFlag.symbols b/tests/baselines/reference/bundledNodeDTSFailsWithOutFlag.symbols new file mode 100644 index 00000000000..b4cce9a0da3 --- /dev/null +++ b/tests/baselines/reference/bundledNodeDTSFailsWithOutFlag.symbols @@ -0,0 +1,34 @@ +=== tests/cases/conformance/declarationEmit/index.ts === +export * from "./nested"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts === +import { B } from "./shared"; +>B : Symbol(B, Decl(base.ts, 0, 8)) + +export function f() { +>f : Symbol(f, Decl(base.ts, 0, 29)) + + return new B(); +>B : Symbol(B, Decl(base.ts, 0, 8)) +} + +=== tests/cases/conformance/declarationEmit/nested/derived.ts === +import { f } from "./base"; +>f : Symbol(f, Decl(derived.ts, 0, 8)) + +export function g() { +>g : Symbol(g, Decl(derived.ts, 0, 27)) + + return f(); +>f : Symbol(f, Decl(derived.ts, 0, 8)) +} + +=== tests/cases/conformance/declarationEmit/nested/index.ts === +export * from "./base"; +No type information for this code.export * from "./derived"; +No type information for this code.export * from "./shared"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts === +export class B {} +>B : Symbol(B, Decl(shared.ts, 0, 0)) + diff --git a/tests/baselines/reference/bundledNodeDTSFailsWithOutFlag.types b/tests/baselines/reference/bundledNodeDTSFailsWithOutFlag.types new file mode 100644 index 00000000000..d9f39036baf --- /dev/null +++ b/tests/baselines/reference/bundledNodeDTSFailsWithOutFlag.types @@ -0,0 +1,36 @@ +=== tests/cases/conformance/declarationEmit/index.ts === +export * from "./nested"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts === +import { B } from "./shared"; +>B : typeof B + +export function f() { +>f : () => B + + return new B(); +>new B() : B +>B : typeof B +} + +=== tests/cases/conformance/declarationEmit/nested/derived.ts === +import { f } from "./base"; +>f : () => import("tests/cases/conformance/declarationEmit/index").B + +export function g() { +>g : () => import("tests/cases/conformance/declarationEmit/index").B + + return f(); +>f() : import("tests/cases/conformance/declarationEmit/index").B +>f : () => import("tests/cases/conformance/declarationEmit/index").B +} + +=== tests/cases/conformance/declarationEmit/nested/index.ts === +export * from "./base"; +No type information for this code.export * from "./derived"; +No type information for this code.export * from "./shared"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts === +export class B {} +>B : B + diff --git a/tests/baselines/reference/bundledNodeDTSPassesWithFlag.js b/tests/baselines/reference/bundledNodeDTSPassesWithFlag.js new file mode 100644 index 00000000000..d671430a280 --- /dev/null +++ b/tests/baselines/reference/bundledNodeDTSPassesWithFlag.js @@ -0,0 +1,50 @@ +//// [tests/cases/conformance/declarationEmit/bundledNodeDTSPassesWithFlag.ts] //// + +//// [index.ts] +export * from "./nested"; + +//// [base.ts] +import { B } from "./shared"; + +export function f() { + return new B(); +} + +//// [derived.ts] +import { f } from "./base"; + +export function g() { + return f(); +} + +//// [index.ts] +export * from "./base"; +export * from "./derived"; +export * from "./shared"; + +//// [shared.ts] +export class B {} + + + + +//// [out.d.ts] +declare module "my-pkg/nested/shared" { + export class B { + } +} +declare module "my-pkg/nested/base" { + import { B } from "my-pkg/nested/shared"; + export function f(): B; +} +declare module "my-pkg/nested/derived" { + export function g(): import("my-pkg").B; +} +declare module "my-pkg/nested" { + export * from "my-pkg/nested/base"; + export * from "my-pkg/nested/derived"; + export * from "my-pkg/nested/shared"; +} +declare module "my-pkg" { + export * from "my-pkg/nested"; +} diff --git a/tests/baselines/reference/bundledNodeDTSPassesWithFlag.symbols b/tests/baselines/reference/bundledNodeDTSPassesWithFlag.symbols new file mode 100644 index 00000000000..b4cce9a0da3 --- /dev/null +++ b/tests/baselines/reference/bundledNodeDTSPassesWithFlag.symbols @@ -0,0 +1,34 @@ +=== tests/cases/conformance/declarationEmit/index.ts === +export * from "./nested"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts === +import { B } from "./shared"; +>B : Symbol(B, Decl(base.ts, 0, 8)) + +export function f() { +>f : Symbol(f, Decl(base.ts, 0, 29)) + + return new B(); +>B : Symbol(B, Decl(base.ts, 0, 8)) +} + +=== tests/cases/conformance/declarationEmit/nested/derived.ts === +import { f } from "./base"; +>f : Symbol(f, Decl(derived.ts, 0, 8)) + +export function g() { +>g : Symbol(g, Decl(derived.ts, 0, 27)) + + return f(); +>f : Symbol(f, Decl(derived.ts, 0, 8)) +} + +=== tests/cases/conformance/declarationEmit/nested/index.ts === +export * from "./base"; +No type information for this code.export * from "./derived"; +No type information for this code.export * from "./shared"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts === +export class B {} +>B : Symbol(B, Decl(shared.ts, 0, 0)) + diff --git a/tests/baselines/reference/bundledNodeDTSPassesWithFlag.types b/tests/baselines/reference/bundledNodeDTSPassesWithFlag.types new file mode 100644 index 00000000000..d9f39036baf --- /dev/null +++ b/tests/baselines/reference/bundledNodeDTSPassesWithFlag.types @@ -0,0 +1,36 @@ +=== tests/cases/conformance/declarationEmit/index.ts === +export * from "./nested"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts === +import { B } from "./shared"; +>B : typeof B + +export function f() { +>f : () => B + + return new B(); +>new B() : B +>B : typeof B +} + +=== tests/cases/conformance/declarationEmit/nested/derived.ts === +import { f } from "./base"; +>f : () => import("tests/cases/conformance/declarationEmit/index").B + +export function g() { +>g : () => import("tests/cases/conformance/declarationEmit/index").B + + return f(); +>f() : import("tests/cases/conformance/declarationEmit/index").B +>f : () => import("tests/cases/conformance/declarationEmit/index").B +} + +=== tests/cases/conformance/declarationEmit/nested/index.ts === +export * from "./base"; +No type information for this code.export * from "./derived"; +No type information for this code.export * from "./shared"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts === +export class B {} +>B : B + diff --git a/tests/baselines/reference/bundledNodeDTSWithExports.js b/tests/baselines/reference/bundledNodeDTSWithExports.js new file mode 100644 index 00000000000..69dc79e917d --- /dev/null +++ b/tests/baselines/reference/bundledNodeDTSWithExports.js @@ -0,0 +1,44 @@ +//// [tests/cases/conformance/declarationEmit/bundledNodeDTSWithExports.ts] //// + +//// [index.ts] +export {} + +//// [base.ts] +import { C } from "./"; + +export function f() { + return new C(); +} + +//// [derived.ts] +import { f } from "./base"; + +export function g() { + return f(); +} + +//// [index.ts] +export * from "./base"; +export * from "./derived"; +export class C {} + + + + +//// [out.d.ts] +declare module "my-pkg" { + export {}; +} +declare module "my-pkg/nested/derived" { + export function g(): import("my-pkg/nested").C; +} +declare module "my-pkg/nested" { + export * from "my-pkg/nested/base"; + export * from "my-pkg/nested/derived"; + export class C { + } +} +declare module "my-pkg/nested/base" { + import { C } from "my-pkg/nested"; + export function f(): C; +} diff --git a/tests/baselines/reference/bundledNodeDTSWithExports.symbols b/tests/baselines/reference/bundledNodeDTSWithExports.symbols new file mode 100644 index 00000000000..29721558317 --- /dev/null +++ b/tests/baselines/reference/bundledNodeDTSWithExports.symbols @@ -0,0 +1,31 @@ +=== tests/cases/conformance/declarationEmit/index.ts === +export {} +No type information for this code. +No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts === +import { C } from "./"; +>C : Symbol(C, Decl(base.ts, 0, 8)) + +export function f() { +>f : Symbol(f, Decl(base.ts, 0, 23)) + + return new C(); +>C : Symbol(C, Decl(base.ts, 0, 8)) +} + +=== tests/cases/conformance/declarationEmit/nested/derived.ts === +import { f } from "./base"; +>f : Symbol(f, Decl(derived.ts, 0, 8)) + +export function g() { +>g : Symbol(g, Decl(derived.ts, 0, 27)) + + return f(); +>f : Symbol(f, Decl(derived.ts, 0, 8)) +} + +=== tests/cases/conformance/declarationEmit/nested/index.ts === +export * from "./base"; +export * from "./derived"; +export class C {} +>C : Symbol(C, Decl(index.ts, 1, 26)) + diff --git a/tests/baselines/reference/bundledNodeDTSWithExports.types b/tests/baselines/reference/bundledNodeDTSWithExports.types new file mode 100644 index 00000000000..8442637f11f --- /dev/null +++ b/tests/baselines/reference/bundledNodeDTSWithExports.types @@ -0,0 +1,33 @@ +=== tests/cases/conformance/declarationEmit/index.ts === +export {} +No type information for this code. +No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts === +import { C } from "./"; +>C : typeof C + +export function f() { +>f : () => C + + return new C(); +>new C() : C +>C : typeof C +} + +=== tests/cases/conformance/declarationEmit/nested/derived.ts === +import { f } from "./base"; +>f : () => import("tests/cases/conformance/declarationEmit/nested/index").C + +export function g() { +>g : () => import("tests/cases/conformance/declarationEmit/nested/index").C + + return f(); +>f() : import("tests/cases/conformance/declarationEmit/nested/index").C +>f : () => import("tests/cases/conformance/declarationEmit/nested/index").C +} + +=== tests/cases/conformance/declarationEmit/nested/index.ts === +export * from "./base"; +export * from "./derived"; +export class C {} +>C : C + diff --git a/tests/baselines/reference/bundledNodeDTSWithScopedPackage.js b/tests/baselines/reference/bundledNodeDTSWithScopedPackage.js new file mode 100644 index 00000000000..7feb7b4f805 --- /dev/null +++ b/tests/baselines/reference/bundledNodeDTSWithScopedPackage.js @@ -0,0 +1,50 @@ +//// [tests/cases/conformance/declarationEmit/bundledNodeDTSWithScopedPackage.ts] //// + +//// [index.ts] +export * from "./nested"; + +//// [base.ts] +import { B } from "./shared"; + +export function f() { + return new B(); +} + +//// [derived.ts] +import { f } from "./base"; + +export function g() { + return f(); +} + +//// [index.ts] +export * from "./base"; +export * from "./derived"; +export * from "./shared"; + +//// [shared.ts] +export class B {} + + + + +//// [out.d.ts] +declare module "@test/my-pkg/nested/shared" { + export class B { + } +} +declare module "@test/my-pkg/nested/base" { + import { B } from "@test/my-pkg/nested/shared"; + export function f(): B; +} +declare module "@test/my-pkg/nested/derived" { + export function g(): import("@test/my-pkg").B; +} +declare module "@test/my-pkg/nested" { + export * from "@test/my-pkg/nested/base"; + export * from "@test/my-pkg/nested/derived"; + export * from "@test/my-pkg/nested/shared"; +} +declare module "@test/my-pkg" { + export * from "@test/my-pkg/nested"; +} diff --git a/tests/baselines/reference/bundledNodeDTSWithScopedPackage.symbols b/tests/baselines/reference/bundledNodeDTSWithScopedPackage.symbols new file mode 100644 index 00000000000..b4cce9a0da3 --- /dev/null +++ b/tests/baselines/reference/bundledNodeDTSWithScopedPackage.symbols @@ -0,0 +1,34 @@ +=== tests/cases/conformance/declarationEmit/index.ts === +export * from "./nested"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts === +import { B } from "./shared"; +>B : Symbol(B, Decl(base.ts, 0, 8)) + +export function f() { +>f : Symbol(f, Decl(base.ts, 0, 29)) + + return new B(); +>B : Symbol(B, Decl(base.ts, 0, 8)) +} + +=== tests/cases/conformance/declarationEmit/nested/derived.ts === +import { f } from "./base"; +>f : Symbol(f, Decl(derived.ts, 0, 8)) + +export function g() { +>g : Symbol(g, Decl(derived.ts, 0, 27)) + + return f(); +>f : Symbol(f, Decl(derived.ts, 0, 8)) +} + +=== tests/cases/conformance/declarationEmit/nested/index.ts === +export * from "./base"; +No type information for this code.export * from "./derived"; +No type information for this code.export * from "./shared"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts === +export class B {} +>B : Symbol(B, Decl(shared.ts, 0, 0)) + diff --git a/tests/baselines/reference/bundledNodeDTSWithScopedPackage.types b/tests/baselines/reference/bundledNodeDTSWithScopedPackage.types new file mode 100644 index 00000000000..d9f39036baf --- /dev/null +++ b/tests/baselines/reference/bundledNodeDTSWithScopedPackage.types @@ -0,0 +1,36 @@ +=== tests/cases/conformance/declarationEmit/index.ts === +export * from "./nested"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/declarationEmit/nested/base.ts === +import { B } from "./shared"; +>B : typeof B + +export function f() { +>f : () => B + + return new B(); +>new B() : B +>B : typeof B +} + +=== tests/cases/conformance/declarationEmit/nested/derived.ts === +import { f } from "./base"; +>f : () => import("tests/cases/conformance/declarationEmit/index").B + +export function g() { +>g : () => import("tests/cases/conformance/declarationEmit/index").B + + return f(); +>f() : import("tests/cases/conformance/declarationEmit/index").B +>f : () => import("tests/cases/conformance/declarationEmit/index").B +} + +=== tests/cases/conformance/declarationEmit/nested/index.ts === +export * from "./base"; +No type information for this code.export * from "./derived"; +No type information for this code.export * from "./shared"; +No type information for this code. +No type information for this code.=== tests/cases/conformance/declarationEmit/nested/shared.ts === +export class B {} +>B : B + diff --git a/tests/baselines/reference/cachedModuleResolution8.errors.txt b/tests/baselines/reference/cachedModuleResolution8.errors.txt index e80de6969f6..d7111d8b4b4 100644 --- a/tests/baselines/reference/cachedModuleResolution8.errors.txt +++ b/tests/baselines/reference/cachedModuleResolution8.errors.txt @@ -1,13 +1,13 @@ -/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. -/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +/a/b/c/d/e/app.ts(1,17): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +/a/b/c/lib.ts(1,17): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== /a/b/c/d/e/app.ts (1 errors) ==== import {x} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== /a/b/c/lib.ts (1 errors) ==== import {x} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. \ No newline at end of file +!!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? \ No newline at end of file diff --git a/tests/baselines/reference/cachedModuleResolution9.errors.txt b/tests/baselines/reference/cachedModuleResolution9.errors.txt index 0dc795af6b3..d212a55a914 100644 --- a/tests/baselines/reference/cachedModuleResolution9.errors.txt +++ b/tests/baselines/reference/cachedModuleResolution9.errors.txt @@ -1,15 +1,15 @@ -/a/b/c/d/e/app.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. -/a/b/c/lib.ts(1,17): error TS2307: Cannot find module 'foo' or its corresponding type declarations. +/a/b/c/d/e/app.ts(1,17): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +/a/b/c/lib.ts(1,17): error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== /a/b/c/lib.ts (1 errors) ==== import {x} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== /a/b/c/d/e/app.ts (1 errors) ==== import {x} from "foo"; ~~~~~ -!!! error TS2307: Cannot find module 'foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? \ No newline at end of file diff --git a/tests/baselines/reference/callHierarchyCallExpressionByConstNamedFunctionExpression.callHierarchy.txt b/tests/baselines/reference/callHierarchyCallExpressionByConstNamedFunctionExpression.callHierarchy.txt new file mode 100644 index 00000000000..470cec600f3 --- /dev/null +++ b/tests/baselines/reference/callHierarchyCallExpressionByConstNamedFunctionExpression.callHierarchy.txt @@ -0,0 +1,107 @@ +╭ name: bar +├ kind: function +├ file: /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts +├ span: +│ ╭ /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts:5:13-7:2 +│ │ 5: const bar = function () { +│ │ ^^^^^^^^^^^^^ +│ │ 6: baz(); +│ │ ^^^^^^^^^^ +│ │ 7: } +│ │ ^ +│ ╰ +├ selectionSpan: +│ ╭ /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts:5:7-5:10 +│ │ 5: const bar = function () { +│ │ ^^^ +│ ╰ +├ incoming: +│ ╭ from: +│ │ ╭ name: foo +│ │ ├ kind: function +│ │ ├ file: /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts +│ │ ├ span: +│ │ │ ╭ /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts:1:1-3:2 +│ │ │ │ 1: function foo() { +│ │ │ │ ^^^^^^^^^^^^^^^^ +│ │ │ │ 2: bar(); +│ │ │ │ ^^^^^^^^^^ +│ │ │ │ 3: } +│ │ │ │ ^ +│ │ │ ╰ +│ │ ├ selectionSpan: +│ │ │ ╭ /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts:1:10-1:13 +│ │ │ │ 1: function foo() { +│ │ │ │ ^^^ +│ │ │ ╰ +│ │ ╰ incoming: none +│ ├ fromSpans: +│ │ ╭ /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts:2:5-2:8 +│ │ │ 2: bar(); +│ │ │ ^^^ +│ ╰ ╰ +│ ╭ from: +│ │ ╭ name: /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts +│ │ ├ kind: script +│ │ ├ file: /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts +│ │ ├ span: +│ │ │ ╭ /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts:1:1-12:6 +│ │ │ │ 1: function foo() { +│ │ │ │ ^^^^^^^^^^^^^^^^ +│ │ │ │ 2: bar(); +│ │ │ │ ^^^^^^^^^^ +│ │ │ │ 3: } +│ │ │ │ ^ +│ │ │ │ 4: +│ │ │ │ ^ +│ │ │ │ 5: const bar = function () { +│ │ │ │ ^^^^^^^^^^^^^^^^^^^^^^^^^ +│ │ │ │ 6: baz(); +│ │ │ │ ^^^^^^^^^^ +│ │ │ │ 7: } +│ │ │ │ ^ +│ │ │ │ 8: +│ │ │ │ ^ +│ │ │ │ 9: function baz() { +│ │ │ │ ^^^^^^^^^^^^^^^^ +│ │ │ │ 10: } +│ │ │ │ ^ +│ │ │ │ 11: +│ │ │ │ ^ +│ │ │ │ 12: bar() +│ │ │ │ ^^^^^ +│ │ │ ╰ +│ │ ├ selectionSpan: +│ │ │ ╭ /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts:1:1-1:1 +│ │ │ │ 1: function foo() { +│ │ │ │ < +│ │ │ ╰ +│ │ ╰ incoming: none +│ ├ fromSpans: +│ │ ╭ /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts:12:1-12:4 +│ │ │ 12: bar() +│ │ │ ^^^ +│ ╰ ╰ +├ outgoing: +│ ╭ to: +│ │ ╭ name: baz +│ │ ├ kind: function +│ │ ├ file: /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts +│ │ ├ span: +│ │ │ ╭ /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts:9:1-10:2 +│ │ │ │ 9: function baz() { +│ │ │ │ ^^^^^^^^^^^^^^^^ +│ │ │ │ 10: } +│ │ │ │ ^ +│ │ │ ╰ +│ │ ├ selectionSpan: +│ │ │ ╭ /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts:9:10-9:13 +│ │ │ │ 9: function baz() { +│ │ │ │ ^^^ +│ │ │ ╰ +│ │ ╰ outgoing: none +│ ├ fromSpans: +│ │ ╭ /tests/cases/fourslash/callHierarchyCallExpressionByConstNamedFunctionExpression.ts:6:5-6:8 +│ │ │ 6: baz(); +│ │ │ ^^^ +╰ ╰ ╰ diff --git a/tests/baselines/reference/callHierarchyContainerNameServer.callHierarchy.txt b/tests/baselines/reference/callHierarchyContainerNameServer.callHierarchy.txt new file mode 100644 index 00000000000..583fa14f605 --- /dev/null +++ b/tests/baselines/reference/callHierarchyContainerNameServer.callHierarchy.txt @@ -0,0 +1,165 @@ +╭ name: f +├ kind: function +├ file: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts +├ span: +│ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:1:1-1:16 +│ │ 1: function f() {} +│ │ ^^^^^^^^^^^^^^^ +│ ╰ +├ selectionSpan: +│ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:1:10-1:11 +│ │ 1: function f() {} +│ │ ^ +│ ╰ +├ incoming: +│ ╭ from: +│ │ ╭ name: sameName +│ │ ├ kind: method +│ │ ├ containerName: A +│ │ ├ file: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts +│ │ ├ span: +│ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:4:3-6:4 +│ │ │ │ 4: static sameName() { +│ │ │ │ ^^^^^^^^^^^^^^^^^^^ +│ │ │ │ 5: f(); +│ │ │ │ ^^^^^^^^ +│ │ │ │ 6: } +│ │ │ │ ^^^ +│ │ │ ╰ +│ │ ├ selectionSpan: +│ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:4:10-4:18 +│ │ │ │ 4: static sameName() { +│ │ │ │ ^^^^^^^^ +│ │ │ ╰ +│ │ ├ incoming: +│ │ │ ╭ from: +│ │ │ │ ╭ name: sameName +│ │ │ │ ├ kind: method +│ │ │ │ ├ containerName: B +│ │ │ │ ├ file: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts +│ │ │ │ ├ span: +│ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:10:3-12:4 +│ │ │ │ │ │ 10: sameName() { +│ │ │ │ │ │ ^^^^^^^^^^^^ +│ │ │ │ │ │ 11: A.sameName(); +│ │ │ │ │ │ ^^^^^^^^^^^^^^^^^ +│ │ │ │ │ │ 12: } +│ │ │ │ │ │ ^^^ +│ │ │ │ │ ╰ +│ │ │ │ ├ selectionSpan: +│ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:10:3-10:11 +│ │ │ │ │ │ 10: sameName() { +│ │ │ │ │ │ ^^^^^^^^ +│ │ │ │ │ ╰ +│ │ │ │ ├ incoming: +│ │ │ │ │ ╭ from: +│ │ │ │ │ │ ╭ name: sameName +│ │ │ │ │ │ ├ kind: getter +│ │ │ │ │ │ ├ containerName: Obj +│ │ │ │ │ │ ├ file: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts +│ │ │ │ │ │ ├ span: +│ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:16:3-18:4 +│ │ │ │ │ │ │ │ 16: get sameName() { +│ │ │ │ │ │ │ │ ^^^^^^^^^^^^^^^^ +│ │ │ │ │ │ │ │ 17: return new B().sameName; +│ │ │ │ │ │ │ │ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ +│ │ │ │ │ │ │ │ 18: } +│ │ │ │ │ │ │ │ ^^^ +│ │ │ │ │ │ │ ╰ +│ │ │ │ │ │ ├ selectionSpan: +│ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:16:7-16:15 +│ │ │ │ │ │ │ │ 16: get sameName() { +│ │ │ │ │ │ │ │ ^^^^^^^^ +│ │ │ │ │ │ │ ╰ +│ │ │ │ │ │ ├ incoming: +│ │ │ │ │ │ │ ╭ from: +│ │ │ │ │ │ │ │ ╭ name: sameName +│ │ │ │ │ │ │ │ ├ kind: function +│ │ │ │ │ │ │ │ ├ containerName: Foo +│ │ │ │ │ │ │ │ ├ file: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts +│ │ │ │ │ │ │ │ ├ span: +│ │ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:22:3-24:4 +│ │ │ │ │ │ │ │ │ │ 22: function sameName() { +│ │ │ │ │ │ │ │ │ │ ^^^^^^^^^^^^^^^^^^^^^ +│ │ │ │ │ │ │ │ │ │ 23: return Obj.sameName; +│ │ │ │ │ │ │ │ │ │ ^^^^^^^^^^^^^^^^^^^^^^^^ +│ │ │ │ │ │ │ │ │ │ 24: } +│ │ │ │ │ │ │ │ │ │ ^^^ +│ │ │ │ │ │ │ │ │ ╰ +│ │ │ │ │ │ │ │ ├ selectionSpan: +│ │ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:22:12-22:20 +│ │ │ │ │ │ │ │ │ │ 22: function sameName() { +│ │ │ │ │ │ │ │ │ │ ^^^^^^^^ +│ │ │ │ │ │ │ │ │ ╰ +│ │ │ │ │ │ │ │ ├ incoming: +│ │ │ │ │ │ │ │ │ ╭ from: +│ │ │ │ │ │ │ │ │ │ ╭ name: C +│ │ │ │ │ │ │ │ │ │ ├ kind: class +│ │ │ │ │ │ │ │ │ │ ├ containerName: Foo +│ │ │ │ │ │ │ │ │ │ ├ file: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts +│ │ │ │ │ │ │ │ │ │ ├ span: +│ │ │ │ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:26:3-30:4 +│ │ │ │ │ │ │ │ │ │ │ │ 26: export class C { +│ │ │ │ │ │ │ │ │ │ │ │ ^^^^^^^^^^^^^^^^ +│ │ │ │ │ │ │ │ │ │ │ │ 27: constructor() { +│ │ │ │ │ │ │ │ │ │ │ │ ^^^^^^^^^^^^^^^^^^^ +│ │ │ │ │ │ │ │ │ │ │ │ 28: sameName(); +│ │ │ │ │ │ │ │ │ │ │ │ ^^^^^^^^^^^^^^^^^ +│ │ │ │ │ │ │ │ │ │ │ │ 29: } +│ │ │ │ │ │ │ │ │ │ │ │ ^^^^^ +│ │ │ │ │ │ │ │ │ │ │ │ 30: } +│ │ │ │ │ │ │ │ │ │ │ │ ^^^ +│ │ │ │ │ │ │ │ │ │ │ ╰ +│ │ │ │ │ │ │ │ │ │ ├ selectionSpan: +│ │ │ │ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:26:16-26:17 +│ │ │ │ │ │ │ │ │ │ │ │ 26: export class C { +│ │ │ │ │ │ │ │ │ │ │ │ ^ +│ │ │ │ │ │ │ │ │ │ │ ╰ +│ │ │ │ │ │ │ │ │ │ ├ incoming: +│ │ │ │ │ │ │ │ │ │ │ ╭ from: +│ │ │ │ │ │ │ │ │ │ │ │ ╭ name: sameName +│ │ │ │ │ │ │ │ │ │ │ │ ├ kind: function +│ │ │ │ │ │ │ │ │ │ │ │ ├ containerName: Bar +│ │ │ │ │ │ │ │ │ │ │ │ ├ file: /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts +│ │ │ │ │ │ │ │ │ │ │ │ ├ span: +│ │ │ │ │ │ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:34:20-34:37 +│ │ │ │ │ │ │ │ │ │ │ │ │ │ 34: const sameName = () => new Foo.C(); +│ │ │ │ │ │ │ │ │ │ │ │ │ │ ^^^^^^^^^^^^^^^^^ +│ │ │ │ │ │ │ │ │ │ │ │ │ ╰ +│ │ │ │ │ │ │ │ │ │ │ │ ├ selectionSpan: +│ │ │ │ │ │ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:34:9-34:17 +│ │ │ │ │ │ │ │ │ │ │ │ │ │ 34: const sameName = () => new Foo.C(); +│ │ │ │ │ │ │ │ │ │ │ │ │ │ ^^^^^^^^ +│ │ │ │ │ │ │ │ │ │ │ │ │ ╰ +│ │ │ │ │ │ │ │ │ │ │ │ ╰ incoming: none +│ │ │ │ │ │ │ │ │ │ │ ├ fromSpans: +│ │ │ │ │ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:34:34-34:35 +│ │ │ │ │ │ │ │ │ │ │ │ │ 34: const sameName = () => new Foo.C(); +│ │ │ │ │ │ │ │ │ │ │ │ │ ^ +│ │ │ │ │ │ │ │ │ │ ╰ ╰ ╰ +│ │ │ │ │ │ │ │ │ ├ fromSpans: +│ │ │ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:28:7-28:15 +│ │ │ │ │ │ │ │ │ │ │ 28: sameName(); +│ │ │ │ │ │ │ │ │ │ │ ^^^^^^^^ +│ │ │ │ │ │ │ │ ╰ ╰ ╰ +│ │ │ │ │ │ │ ├ fromSpans: +│ │ │ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:23:16-23:24 +│ │ │ │ │ │ │ │ │ 23: return Obj.sameName; +│ │ │ │ │ │ │ │ │ ^^^^^^^^ +│ │ │ │ │ │ ╰ ╰ ╰ +│ │ │ │ │ ├ fromSpans: +│ │ │ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:17:20-17:28 +│ │ │ │ │ │ │ 17: return new B().sameName; +│ │ │ │ │ │ │ ^^^^^^^^ +│ │ │ │ ╰ ╰ ╰ +│ │ │ ├ fromSpans: +│ │ │ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:11:7-11:15 +│ │ │ │ │ 11: A.sameName(); +│ │ │ │ │ ^^^^^^^^ +│ │ ╰ ╰ ╰ +│ ├ fromSpans: +│ │ ╭ /tests/cases/fourslash/server/callHierarchyContainerNameServer.ts:5:5-5:6 +│ │ │ 5: f(); +│ │ │ ^ +│ ╰ ╰ +╰ outgoing: none diff --git a/tests/baselines/reference/callWithMissingVoid.errors.txt b/tests/baselines/reference/callWithMissingVoid.errors.txt index 45a66c7a81e..dcce7a005e2 100644 --- a/tests/baselines/reference/callWithMissingVoid.errors.txt +++ b/tests/baselines/reference/callWithMissingVoid.errors.txt @@ -4,7 +4,7 @@ tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(22,8): tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(35,31): error TS2554: Expected 1 arguments, but got 0. tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(36,35): error TS2554: Expected 1 arguments, but got 0. tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(37,33): error TS2554: Expected 1 arguments, but got 0. -tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(48,1): error TS2554: Expected 3 arguments, but got 1. +tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(48,1): error TS2554: Expected 2-3 arguments, but got 1. tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(55,1): error TS2554: Expected 4 arguments, but got 2. tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(56,1): error TS2554: Expected 4 arguments, but got 3. tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(57,1): error TS2554: Expected 4 arguments, but got 1. @@ -79,7 +79,7 @@ tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(75,1): a(4, "hello", void 0); // ok a(4); // not ok ~~~~ -!!! error TS2554: Expected 3 arguments, but got 1. +!!! error TS2554: Expected 2-3 arguments, but got 1. !!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:42:23: An argument for 'y' was not provided. function b(x: number, y: string, z: void, what: number): void { @@ -119,7 +119,7 @@ tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts(75,1): call((x: number, y: number) => x + y) // error ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2554: Expected 3 arguments, but got 1. -!!! related TS6210 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:73:5: An argument for 'args' was not provided. +!!! related TS6236 tests/cases/conformance/expressions/functionCalls/callWithMissingVoid.ts:73:5: Arguments for the rest parameter 'args' were not provided. call((x: number, y: number) => x + y, 4, 2) // ok call((x: number, y: void) => x, 4, void 0) // ok diff --git a/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).errors.txt b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).errors.txt new file mode 100644 index 00000000000..6b9f6d3a7ba --- /dev/null +++ b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).errors.txt @@ -0,0 +1,66 @@ +tests/cases/conformance/expressions/functionCalls/tsfile.ts(6,1): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/expressions/functionCalls/tsfile.ts(7,1): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/expressions/functionCalls/tsfile.ts(8,1): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/expressions/functionCalls/tsfile.ts(10,4): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/expressions/functionCalls/tsfile.ts(11,4): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/expressions/functionCalls/tsfile.ts(12,4): error TS2554: Expected 1 arguments, but got 0. + + +==== tests/cases/conformance/expressions/functionCalls/defs.d.ts (0 errors) ==== + declare function f1(p: void): void; + declare function f2(p: undefined): void; + declare function f3(p: unknown): void; + declare function f4(p: any): void; + + interface I { m(p: T): void; } + declare const o1: I; + declare const o2: I; + declare const o3: I; + declare const o4: I; + +==== tests/cases/conformance/expressions/functionCalls/jsfile.js (0 errors) ==== + // current behavior: treat trailing `void` as optional + f1(); + o1.m(); + + // new behavior: treat 'undefined', 'unknown', and 'any' as optional in non-strict mode + f2(); + f3(); + f4(); + + o2.m(); + o3.m(); + o4.m(); + +==== tests/cases/conformance/expressions/functionCalls/tsfile.ts (6 errors) ==== + // current behavior: treat trailing `void` as optional + f1(); + o1.m(); + + // no change in behavior + f2(); + ~~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:2:21: An argument for 'p' was not provided. + f3(); + ~~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:3:21: An argument for 'p' was not provided. + f4(); + ~~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:4:21: An argument for 'p' was not provided. + + o2.m(); + ~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:6:20: An argument for 'p' was not provided. + o3.m(); + ~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:6:20: An argument for 'p' was not provided. + o4.m(); + ~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:6:20: An argument for 'p' was not provided. + \ No newline at end of file diff --git a/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).symbols b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).symbols new file mode 100644 index 00000000000..26d6106e28e --- /dev/null +++ b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).symbols @@ -0,0 +1,110 @@ +=== tests/cases/conformance/expressions/functionCalls/defs.d.ts === +declare function f1(p: void): void; +>f1 : Symbol(f1, Decl(defs.d.ts, 0, 0)) +>p : Symbol(p, Decl(defs.d.ts, 0, 20)) + +declare function f2(p: undefined): void; +>f2 : Symbol(f2, Decl(defs.d.ts, 0, 35)) +>p : Symbol(p, Decl(defs.d.ts, 1, 20)) + +declare function f3(p: unknown): void; +>f3 : Symbol(f3, Decl(defs.d.ts, 1, 40)) +>p : Symbol(p, Decl(defs.d.ts, 2, 20)) + +declare function f4(p: any): void; +>f4 : Symbol(f4, Decl(defs.d.ts, 2, 38)) +>p : Symbol(p, Decl(defs.d.ts, 3, 20)) + +interface I { m(p: T): void; } +>I : Symbol(I, Decl(defs.d.ts, 3, 34)) +>T : Symbol(T, Decl(defs.d.ts, 5, 12)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>p : Symbol(p, Decl(defs.d.ts, 5, 19)) +>T : Symbol(T, Decl(defs.d.ts, 5, 12)) + +declare const o1: I; +>o1 : Symbol(o1, Decl(defs.d.ts, 6, 13)) +>I : Symbol(I, Decl(defs.d.ts, 3, 34)) + +declare const o2: I; +>o2 : Symbol(o2, Decl(defs.d.ts, 7, 13)) +>I : Symbol(I, Decl(defs.d.ts, 3, 34)) + +declare const o3: I; +>o3 : Symbol(o3, Decl(defs.d.ts, 8, 13)) +>I : Symbol(I, Decl(defs.d.ts, 3, 34)) + +declare const o4: I; +>o4 : Symbol(o4, Decl(defs.d.ts, 9, 13)) +>I : Symbol(I, Decl(defs.d.ts, 3, 34)) + +=== tests/cases/conformance/expressions/functionCalls/jsfile.js === +// current behavior: treat trailing `void` as optional +f1(); +>f1 : Symbol(f1, Decl(defs.d.ts, 0, 0)) + +o1.m(); +>o1.m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>o1 : Symbol(o1, Decl(defs.d.ts, 6, 13)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) + +// new behavior: treat 'undefined', 'unknown', and 'any' as optional in non-strict mode +f2(); +>f2 : Symbol(f2, Decl(defs.d.ts, 0, 35)) + +f3(); +>f3 : Symbol(f3, Decl(defs.d.ts, 1, 40)) + +f4(); +>f4 : Symbol(f4, Decl(defs.d.ts, 2, 38)) + +o2.m(); +>o2.m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>o2 : Symbol(o2, Decl(defs.d.ts, 7, 13)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) + +o3.m(); +>o3.m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>o3 : Symbol(o3, Decl(defs.d.ts, 8, 13)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) + +o4.m(); +>o4.m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>o4 : Symbol(o4, Decl(defs.d.ts, 9, 13)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) + +=== tests/cases/conformance/expressions/functionCalls/tsfile.ts === +// current behavior: treat trailing `void` as optional +f1(); +>f1 : Symbol(f1, Decl(defs.d.ts, 0, 0)) + +o1.m(); +>o1.m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>o1 : Symbol(o1, Decl(defs.d.ts, 6, 13)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) + +// no change in behavior +f2(); +>f2 : Symbol(f2, Decl(defs.d.ts, 0, 35)) + +f3(); +>f3 : Symbol(f3, Decl(defs.d.ts, 1, 40)) + +f4(); +>f4 : Symbol(f4, Decl(defs.d.ts, 2, 38)) + +o2.m(); +>o2.m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>o2 : Symbol(o2, Decl(defs.d.ts, 7, 13)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) + +o3.m(); +>o3.m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>o3 : Symbol(o3, Decl(defs.d.ts, 8, 13)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) + +o4.m(); +>o4.m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>o4 : Symbol(o4, Decl(defs.d.ts, 9, 13)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) + diff --git a/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).types b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).types new file mode 100644 index 00000000000..a32cfb6a123 --- /dev/null +++ b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=false).types @@ -0,0 +1,119 @@ +=== tests/cases/conformance/expressions/functionCalls/defs.d.ts === +declare function f1(p: void): void; +>f1 : (p: void) => void +>p : void + +declare function f2(p: undefined): void; +>f2 : (p: undefined) => void +>p : undefined + +declare function f3(p: unknown): void; +>f3 : (p: unknown) => void +>p : unknown + +declare function f4(p: any): void; +>f4 : (p: any) => void +>p : any + +interface I { m(p: T): void; } +>m : (p: T) => void +>p : T + +declare const o1: I; +>o1 : I + +declare const o2: I; +>o2 : I + +declare const o3: I; +>o3 : I + +declare const o4: I; +>o4 : I + +=== tests/cases/conformance/expressions/functionCalls/jsfile.js === +// current behavior: treat trailing `void` as optional +f1(); +>f1() : void +>f1 : (p: void) => void + +o1.m(); +>o1.m() : void +>o1.m : (p: void) => void +>o1 : I +>m : (p: void) => void + +// new behavior: treat 'undefined', 'unknown', and 'any' as optional in non-strict mode +f2(); +>f2() : void +>f2 : (p: undefined) => void + +f3(); +>f3() : void +>f3 : (p: unknown) => void + +f4(); +>f4() : void +>f4 : (p: any) => void + +o2.m(); +>o2.m() : void +>o2.m : (p: undefined) => void +>o2 : I +>m : (p: undefined) => void + +o3.m(); +>o3.m() : void +>o3.m : (p: unknown) => void +>o3 : I +>m : (p: unknown) => void + +o4.m(); +>o4.m() : void +>o4.m : (p: any) => void +>o4 : I +>m : (p: any) => void + +=== tests/cases/conformance/expressions/functionCalls/tsfile.ts === +// current behavior: treat trailing `void` as optional +f1(); +>f1() : void +>f1 : (p: void) => void + +o1.m(); +>o1.m() : void +>o1.m : (p: void) => void +>o1 : I +>m : (p: void) => void + +// no change in behavior +f2(); +>f2() : void +>f2 : (p: undefined) => void + +f3(); +>f3() : void +>f3 : (p: unknown) => void + +f4(); +>f4() : void +>f4 : (p: any) => void + +o2.m(); +>o2.m() : void +>o2.m : (p: undefined) => void +>o2 : I +>m : (p: undefined) => void + +o3.m(); +>o3.m() : void +>o3.m : (p: unknown) => void +>o3 : I +>m : (p: unknown) => void + +o4.m(); +>o4.m() : void +>o4.m : (p: any) => void +>o4 : I +>m : (p: any) => void + diff --git a/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).errors.txt b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).errors.txt new file mode 100644 index 00000000000..4dfba4afe5e --- /dev/null +++ b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).errors.txt @@ -0,0 +1,90 @@ +tests/cases/conformance/expressions/functionCalls/jsfile.js(6,1): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/expressions/functionCalls/jsfile.js(7,1): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/expressions/functionCalls/jsfile.js(8,1): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/expressions/functionCalls/jsfile.js(10,4): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/expressions/functionCalls/jsfile.js(11,4): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/expressions/functionCalls/jsfile.js(12,4): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/expressions/functionCalls/tsfile.ts(6,1): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/expressions/functionCalls/tsfile.ts(7,1): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/expressions/functionCalls/tsfile.ts(8,1): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/expressions/functionCalls/tsfile.ts(10,4): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/expressions/functionCalls/tsfile.ts(11,4): error TS2554: Expected 1 arguments, but got 0. +tests/cases/conformance/expressions/functionCalls/tsfile.ts(12,4): error TS2554: Expected 1 arguments, but got 0. + + +==== tests/cases/conformance/expressions/functionCalls/defs.d.ts (0 errors) ==== + declare function f1(p: void): void; + declare function f2(p: undefined): void; + declare function f3(p: unknown): void; + declare function f4(p: any): void; + + interface I { m(p: T): void; } + declare const o1: I; + declare const o2: I; + declare const o3: I; + declare const o4: I; + +==== tests/cases/conformance/expressions/functionCalls/jsfile.js (6 errors) ==== + // current behavior: treat trailing `void` as optional + f1(); + o1.m(); + + // new behavior: treat 'undefined', 'unknown', and 'any' as optional in non-strict mode + f2(); + ~~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:2:21: An argument for 'p' was not provided. + f3(); + ~~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:3:21: An argument for 'p' was not provided. + f4(); + ~~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:4:21: An argument for 'p' was not provided. + + o2.m(); + ~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:6:20: An argument for 'p' was not provided. + o3.m(); + ~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:6:20: An argument for 'p' was not provided. + o4.m(); + ~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:6:20: An argument for 'p' was not provided. + +==== tests/cases/conformance/expressions/functionCalls/tsfile.ts (6 errors) ==== + // current behavior: treat trailing `void` as optional + f1(); + o1.m(); + + // no change in behavior + f2(); + ~~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:2:21: An argument for 'p' was not provided. + f3(); + ~~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:3:21: An argument for 'p' was not provided. + f4(); + ~~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:4:21: An argument for 'p' was not provided. + + o2.m(); + ~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:6:20: An argument for 'p' was not provided. + o3.m(); + ~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:6:20: An argument for 'p' was not provided. + o4.m(); + ~~~ +!!! error TS2554: Expected 1 arguments, but got 0. +!!! related TS6210 tests/cases/conformance/expressions/functionCalls/defs.d.ts:6:20: An argument for 'p' was not provided. + \ No newline at end of file diff --git a/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).symbols b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).symbols new file mode 100644 index 00000000000..26d6106e28e --- /dev/null +++ b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).symbols @@ -0,0 +1,110 @@ +=== tests/cases/conformance/expressions/functionCalls/defs.d.ts === +declare function f1(p: void): void; +>f1 : Symbol(f1, Decl(defs.d.ts, 0, 0)) +>p : Symbol(p, Decl(defs.d.ts, 0, 20)) + +declare function f2(p: undefined): void; +>f2 : Symbol(f2, Decl(defs.d.ts, 0, 35)) +>p : Symbol(p, Decl(defs.d.ts, 1, 20)) + +declare function f3(p: unknown): void; +>f3 : Symbol(f3, Decl(defs.d.ts, 1, 40)) +>p : Symbol(p, Decl(defs.d.ts, 2, 20)) + +declare function f4(p: any): void; +>f4 : Symbol(f4, Decl(defs.d.ts, 2, 38)) +>p : Symbol(p, Decl(defs.d.ts, 3, 20)) + +interface I { m(p: T): void; } +>I : Symbol(I, Decl(defs.d.ts, 3, 34)) +>T : Symbol(T, Decl(defs.d.ts, 5, 12)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>p : Symbol(p, Decl(defs.d.ts, 5, 19)) +>T : Symbol(T, Decl(defs.d.ts, 5, 12)) + +declare const o1: I; +>o1 : Symbol(o1, Decl(defs.d.ts, 6, 13)) +>I : Symbol(I, Decl(defs.d.ts, 3, 34)) + +declare const o2: I; +>o2 : Symbol(o2, Decl(defs.d.ts, 7, 13)) +>I : Symbol(I, Decl(defs.d.ts, 3, 34)) + +declare const o3: I; +>o3 : Symbol(o3, Decl(defs.d.ts, 8, 13)) +>I : Symbol(I, Decl(defs.d.ts, 3, 34)) + +declare const o4: I; +>o4 : Symbol(o4, Decl(defs.d.ts, 9, 13)) +>I : Symbol(I, Decl(defs.d.ts, 3, 34)) + +=== tests/cases/conformance/expressions/functionCalls/jsfile.js === +// current behavior: treat trailing `void` as optional +f1(); +>f1 : Symbol(f1, Decl(defs.d.ts, 0, 0)) + +o1.m(); +>o1.m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>o1 : Symbol(o1, Decl(defs.d.ts, 6, 13)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) + +// new behavior: treat 'undefined', 'unknown', and 'any' as optional in non-strict mode +f2(); +>f2 : Symbol(f2, Decl(defs.d.ts, 0, 35)) + +f3(); +>f3 : Symbol(f3, Decl(defs.d.ts, 1, 40)) + +f4(); +>f4 : Symbol(f4, Decl(defs.d.ts, 2, 38)) + +o2.m(); +>o2.m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>o2 : Symbol(o2, Decl(defs.d.ts, 7, 13)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) + +o3.m(); +>o3.m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>o3 : Symbol(o3, Decl(defs.d.ts, 8, 13)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) + +o4.m(); +>o4.m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>o4 : Symbol(o4, Decl(defs.d.ts, 9, 13)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) + +=== tests/cases/conformance/expressions/functionCalls/tsfile.ts === +// current behavior: treat trailing `void` as optional +f1(); +>f1 : Symbol(f1, Decl(defs.d.ts, 0, 0)) + +o1.m(); +>o1.m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>o1 : Symbol(o1, Decl(defs.d.ts, 6, 13)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) + +// no change in behavior +f2(); +>f2 : Symbol(f2, Decl(defs.d.ts, 0, 35)) + +f3(); +>f3 : Symbol(f3, Decl(defs.d.ts, 1, 40)) + +f4(); +>f4 : Symbol(f4, Decl(defs.d.ts, 2, 38)) + +o2.m(); +>o2.m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>o2 : Symbol(o2, Decl(defs.d.ts, 7, 13)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) + +o3.m(); +>o3.m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>o3 : Symbol(o3, Decl(defs.d.ts, 8, 13)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) + +o4.m(); +>o4.m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) +>o4 : Symbol(o4, Decl(defs.d.ts, 9, 13)) +>m : Symbol(I.m, Decl(defs.d.ts, 5, 16)) + diff --git a/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).types b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).types new file mode 100644 index 00000000000..a32cfb6a123 --- /dev/null +++ b/tests/baselines/reference/callWithMissingVoidUndefinedUnknownAnyInJs(strict=true).types @@ -0,0 +1,119 @@ +=== tests/cases/conformance/expressions/functionCalls/defs.d.ts === +declare function f1(p: void): void; +>f1 : (p: void) => void +>p : void + +declare function f2(p: undefined): void; +>f2 : (p: undefined) => void +>p : undefined + +declare function f3(p: unknown): void; +>f3 : (p: unknown) => void +>p : unknown + +declare function f4(p: any): void; +>f4 : (p: any) => void +>p : any + +interface I { m(p: T): void; } +>m : (p: T) => void +>p : T + +declare const o1: I; +>o1 : I + +declare const o2: I; +>o2 : I + +declare const o3: I; +>o3 : I + +declare const o4: I; +>o4 : I + +=== tests/cases/conformance/expressions/functionCalls/jsfile.js === +// current behavior: treat trailing `void` as optional +f1(); +>f1() : void +>f1 : (p: void) => void + +o1.m(); +>o1.m() : void +>o1.m : (p: void) => void +>o1 : I +>m : (p: void) => void + +// new behavior: treat 'undefined', 'unknown', and 'any' as optional in non-strict mode +f2(); +>f2() : void +>f2 : (p: undefined) => void + +f3(); +>f3() : void +>f3 : (p: unknown) => void + +f4(); +>f4() : void +>f4 : (p: any) => void + +o2.m(); +>o2.m() : void +>o2.m : (p: undefined) => void +>o2 : I +>m : (p: undefined) => void + +o3.m(); +>o3.m() : void +>o3.m : (p: unknown) => void +>o3 : I +>m : (p: unknown) => void + +o4.m(); +>o4.m() : void +>o4.m : (p: any) => void +>o4 : I +>m : (p: any) => void + +=== tests/cases/conformance/expressions/functionCalls/tsfile.ts === +// current behavior: treat trailing `void` as optional +f1(); +>f1() : void +>f1 : (p: void) => void + +o1.m(); +>o1.m() : void +>o1.m : (p: void) => void +>o1 : I +>m : (p: void) => void + +// no change in behavior +f2(); +>f2() : void +>f2 : (p: undefined) => void + +f3(); +>f3() : void +>f3 : (p: unknown) => void + +f4(); +>f4() : void +>f4 : (p: any) => void + +o2.m(); +>o2.m() : void +>o2.m : (p: undefined) => void +>o2 : I +>m : (p: undefined) => void + +o3.m(); +>o3.m() : void +>o3.m : (p: unknown) => void +>o3 : I +>m : (p: unknown) => void + +o4.m(); +>o4.m() : void +>o4.m : (p: any) => void +>o4 : I +>m : (p: any) => void + diff --git a/tests/baselines/reference/catchClauseWithTypeAnnotation.errors.txt b/tests/baselines/reference/catchClauseWithTypeAnnotation.errors.txt index e5bd5be16ef..870a7cf8708 100644 --- a/tests/baselines/reference/catchClauseWithTypeAnnotation.errors.txt +++ b/tests/baselines/reference/catchClauseWithTypeAnnotation.errors.txt @@ -4,9 +4,11 @@ tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.t tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts(20,23): error TS1196: Catch clause variable type annotation must be 'any' or 'unknown' if specified. tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts(29,29): error TS2492: Cannot redeclare identifier 'x' in catch clause. tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts(30,29): error TS2403: Subsequent variable declarations must have the same type. Variable 'x' must be of type 'boolean', but here has type 'string'. +tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts(38,27): error TS1196: Catch clause variable type annotation must be 'any' or 'unknown' if specified. +tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts(39,27): error TS1196: Catch clause variable type annotation must be 'any' or 'unknown' if specified. -==== tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts (6 errors) ==== +==== tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts (8 errors) ==== type any1 = any; type unknown1 = unknown; @@ -52,5 +54,16 @@ tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.t !!! related TS6203 tests/cases/conformance/statements/tryStatements/catchClauseWithTypeAnnotation.ts:4:13: 'x' was also declared here. try { } catch (x) { var x: boolean; } + try { } catch ({ x }) { } // should be OK + try { } catch ({ x }: any) { x.foo; } // should be OK + try { } catch ({ x }: any1) { x.foo;} // should be OK + try { } catch ({ x }: unknown) { console.log(x); } // should be OK + try { } catch ({ x }: unknown1) { console.log(x); } // should be OK + try { } catch ({ x }: object) { } // error in the type + ~~~~~~ +!!! error TS1196: Catch clause variable type annotation must be 'any' or 'unknown' if specified. + try { } catch ({ x }: Error) { } // error in the type + ~~~~~ +!!! error TS1196: Catch clause variable type annotation must be 'any' or 'unknown' if specified. } \ No newline at end of file diff --git a/tests/baselines/reference/catchClauseWithTypeAnnotation.js b/tests/baselines/reference/catchClauseWithTypeAnnotation.js index e6ecc235af4..0337d65b437 100644 --- a/tests/baselines/reference/catchClauseWithTypeAnnotation.js +++ b/tests/baselines/reference/catchClauseWithTypeAnnotation.js @@ -31,6 +31,13 @@ function fn(x: boolean) { try { } catch (x) { var x: string; } try { } catch (x) { var x: boolean; } + try { } catch ({ x }) { } // should be OK + try { } catch ({ x }: any) { x.foo; } // should be OK + try { } catch ({ x }: any1) { x.foo;} // should be OK + try { } catch ({ x }: unknown) { console.log(x); } // should be OK + try { } catch ({ x }: unknown1) { console.log(x); } // should be OK + try { } catch ({ x }: object) { } // error in the type + try { } catch ({ x }: Error) { } // error in the type } @@ -99,4 +106,36 @@ function fn(x) { catch (x) { var x; } + try { } + catch (_a) { + var x_2 = _a.x; + } // should be OK + try { } + catch (_b) { + var x_3 = _b.x; + x_3.foo; + } // should be OK + try { } + catch (_c) { + var x_4 = _c.x; + x_4.foo; + } // should be OK + try { } + catch (_d) { + var x_5 = _d.x; + console.log(x_5); + } // should be OK + try { } + catch (_e) { + var x_6 = _e.x; + console.log(x_6); + } // should be OK + try { } + catch (_f) { + var x_7 = _f.x; + } // error in the type + try { } + catch (_g) { + var x_8 = _g.x; + } // error in the type } diff --git a/tests/baselines/reference/catchClauseWithTypeAnnotation.symbols b/tests/baselines/reference/catchClauseWithTypeAnnotation.symbols index b8774e20869..08eaec37b70 100644 --- a/tests/baselines/reference/catchClauseWithTypeAnnotation.symbols +++ b/tests/baselines/reference/catchClauseWithTypeAnnotation.symbols @@ -100,5 +100,38 @@ function fn(x: boolean) { >x : Symbol(x, Decl(catchClauseWithTypeAnnotation.ts, 30, 19)) >x : Symbol(x, Decl(catchClauseWithTypeAnnotation.ts, 3, 12), Decl(catchClauseWithTypeAnnotation.ts, 29, 27), Decl(catchClauseWithTypeAnnotation.ts, 30, 27)) + try { } catch ({ x }) { } // should be OK +>x : Symbol(x, Decl(catchClauseWithTypeAnnotation.ts, 32, 20)) + + try { } catch ({ x }: any) { x.foo; } // should be OK +>x : Symbol(x, Decl(catchClauseWithTypeAnnotation.ts, 33, 20)) +>x : Symbol(x, Decl(catchClauseWithTypeAnnotation.ts, 33, 20)) + + try { } catch ({ x }: any1) { x.foo;} // should be OK +>x : Symbol(x, Decl(catchClauseWithTypeAnnotation.ts, 34, 20)) +>any1 : Symbol(any1, Decl(catchClauseWithTypeAnnotation.ts, 0, 0)) +>x : Symbol(x, Decl(catchClauseWithTypeAnnotation.ts, 34, 20)) + + try { } catch ({ x }: unknown) { console.log(x); } // should be OK +>x : Symbol(x, Decl(catchClauseWithTypeAnnotation.ts, 35, 20)) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>x : Symbol(x, Decl(catchClauseWithTypeAnnotation.ts, 35, 20)) + + try { } catch ({ x }: unknown1) { console.log(x); } // should be OK +>x : Symbol(x, Decl(catchClauseWithTypeAnnotation.ts, 36, 20)) +>unknown1 : Symbol(unknown1, Decl(catchClauseWithTypeAnnotation.ts, 0, 16)) +>console.log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>console : Symbol(console, Decl(lib.dom.d.ts, --, --)) +>log : Symbol(Console.log, Decl(lib.dom.d.ts, --, --)) +>x : Symbol(x, Decl(catchClauseWithTypeAnnotation.ts, 36, 20)) + + try { } catch ({ x }: object) { } // error in the type +>x : Symbol(x, Decl(catchClauseWithTypeAnnotation.ts, 37, 20)) + + try { } catch ({ x }: Error) { } // error in the type +>x : Symbol(x, Decl(catchClauseWithTypeAnnotation.ts, 38, 20)) +>Error : Symbol(Error, Decl(lib.es5.d.ts, --, --), Decl(lib.es5.d.ts, --, --)) } diff --git a/tests/baselines/reference/catchClauseWithTypeAnnotation.types b/tests/baselines/reference/catchClauseWithTypeAnnotation.types index a0d1eec0ab5..d0de759bbbd 100644 --- a/tests/baselines/reference/catchClauseWithTypeAnnotation.types +++ b/tests/baselines/reference/catchClauseWithTypeAnnotation.types @@ -111,5 +111,41 @@ function fn(x: boolean) { >x : any >x : boolean + try { } catch ({ x }) { } // should be OK +>x : any + + try { } catch ({ x }: any) { x.foo; } // should be OK +>x : any +>x.foo : any +>x : any +>foo : any + + try { } catch ({ x }: any1) { x.foo;} // should be OK +>x : any +>x.foo : any +>x : any +>foo : any + + try { } catch ({ x }: unknown) { console.log(x); } // should be OK +>x : any +>console.log(x) : void +>console.log : (...data: any[]) => void +>console : Console +>log : (...data: any[]) => void +>x : any + + try { } catch ({ x }: unknown1) { console.log(x); } // should be OK +>x : any +>console.log(x) : void +>console.log : (...data: any[]) => void +>console : Console +>log : (...data: any[]) => void +>x : any + + try { } catch ({ x }: object) { } // error in the type +>x : any + + try { } catch ({ x }: Error) { } // error in the type +>x : any } diff --git a/tests/baselines/reference/chainedPrototypeAssignment.symbols b/tests/baselines/reference/chainedPrototypeAssignment.symbols index 64211c83d02..bd31b70bc87 100644 --- a/tests/baselines/reference/chainedPrototypeAssignment.symbols +++ b/tests/baselines/reference/chainedPrototypeAssignment.symbols @@ -3,19 +3,19 @@ var mod = require('./mod'); >mod : Symbol(mod, Decl(use.js, 1, 3)) >require : Symbol(require, Decl(types.d.ts, 0, 0)) ->'./mod' : Symbol("tests/cases/conformance/salsa/mod", Decl(mod.js, 0, 0)) +>'./mod' : Symbol(mod, Decl(mod.js, 0, 0)) var a = new mod.A() >a : Symbol(a, Decl(use.js, 2, 3)) ->mod.A : Symbol(A, Decl(mod.js, 6, 1)) +>mod.A : Symbol(mod.A, Decl(mod.js, 6, 1)) >mod : Symbol(mod, Decl(use.js, 1, 3)) ->A : Symbol(A, Decl(mod.js, 6, 1)) +>A : Symbol(mod.A, Decl(mod.js, 6, 1)) var b = new mod.B() >b : Symbol(b, Decl(use.js, 3, 3)) ->mod.B : Symbol(B, Decl(mod.js, 7, 13)) +>mod.B : Symbol(mod.B, Decl(mod.js, 7, 13)) >mod : Symbol(mod, Decl(use.js, 1, 3)) ->B : Symbol(B, Decl(mod.js, 7, 13)) +>B : Symbol(mod.B, Decl(mod.js, 7, 13)) a.m('nope') >a.m : Symbol(m, Decl(mod.js, 9, 29)) diff --git a/tests/baselines/reference/chainedPrototypeAssignment.types b/tests/baselines/reference/chainedPrototypeAssignment.types index d3754807da6..ccd81fa0380 100644 --- a/tests/baselines/reference/chainedPrototypeAssignment.types +++ b/tests/baselines/reference/chainedPrototypeAssignment.types @@ -1,8 +1,8 @@ === tests/cases/conformance/salsa/use.js === /// var mod = require('./mod'); ->mod : typeof import("tests/cases/conformance/salsa/mod") ->require('./mod') : typeof import("tests/cases/conformance/salsa/mod") +>mod : typeof mod +>require('./mod') : typeof mod >require : (name: string) => any >'./mod' : "./mod" @@ -10,14 +10,14 @@ var a = new mod.A() >a : A >new mod.A() : A >mod.A : typeof A ->mod : typeof import("tests/cases/conformance/salsa/mod") +>mod : typeof mod >A : typeof A var b = new mod.B() >b : B >new mod.B() : B >mod.B : typeof B ->mod : typeof import("tests/cases/conformance/salsa/mod") +>mod : typeof mod >B : typeof B a.m('nope') diff --git a/tests/baselines/reference/checkOtherObjectAssignProperty.symbols b/tests/baselines/reference/checkOtherObjectAssignProperty.symbols index 33e85602619..10ff1067b34 100644 --- a/tests/baselines/reference/checkOtherObjectAssignProperty.symbols +++ b/tests/baselines/reference/checkOtherObjectAssignProperty.symbols @@ -1,61 +1,61 @@ === tests/cases/conformance/jsdoc/importer.js === const mod = require("./mod1"); ->mod : Symbol(mod, Decl(importer.js, 0, 5), Decl(importer.js, 6, 9), Decl(importer.js, 9, 14), Decl(importer.js, 10, 14), Decl(importer.js, 11, 13) ... and 2 more) +>mod : Symbol(mod, Decl(importer.js, 0, 5)) >require : Symbol(require) ->"./mod1" : Symbol("tests/cases/conformance/jsdoc/mod1", Decl(mod1.js, 0, 0)) +>"./mod1" : Symbol(mod, Decl(mod1.js, 0, 0)) mod.thing; ->mod.thing : Symbol(thing, Decl(mod1.js, 0, 42)) ->mod : Symbol(mod, Decl(importer.js, 0, 5), Decl(importer.js, 6, 9), Decl(importer.js, 9, 14), Decl(importer.js, 10, 14), Decl(importer.js, 11, 13) ... and 2 more) ->thing : Symbol(thing, Decl(mod1.js, 0, 42)) +>mod.thing : Symbol(mod.thing, Decl(mod1.js, 0, 42)) +>mod : Symbol(mod, Decl(importer.js, 0, 5)) +>thing : Symbol(mod.thing, Decl(mod1.js, 0, 42)) mod.other; ->mod : Symbol(mod, Decl(importer.js, 0, 5), Decl(importer.js, 6, 9), Decl(importer.js, 9, 14), Decl(importer.js, 10, 14), Decl(importer.js, 11, 13) ... and 2 more) +>mod : Symbol(mod, Decl(importer.js, 0, 5)) mod.prop; ->mod : Symbol(mod, Decl(importer.js, 0, 5), Decl(importer.js, 6, 9), Decl(importer.js, 9, 14), Decl(importer.js, 10, 14), Decl(importer.js, 11, 13) ... and 2 more) +>mod : Symbol(mod, Decl(importer.js, 0, 5)) mod.bad1; ->mod.bad1 : Symbol(bad1, Decl(mod1.js, 10, 72)) ->mod : Symbol(mod, Decl(importer.js, 0, 5), Decl(importer.js, 6, 9), Decl(importer.js, 9, 14), Decl(importer.js, 10, 14), Decl(importer.js, 11, 13) ... and 2 more) ->bad1 : Symbol(bad1, Decl(mod1.js, 10, 72)) +>mod.bad1 : Symbol(mod.bad1, Decl(mod1.js, 10, 72)) +>mod : Symbol(mod, Decl(importer.js, 0, 5)) +>bad1 : Symbol(mod.bad1, Decl(mod1.js, 10, 72)) mod.bad2; ->mod.bad2 : Symbol(bad2, Decl(mod1.js, 13, 44)) ->mod : Symbol(mod, Decl(importer.js, 0, 5), Decl(importer.js, 6, 9), Decl(importer.js, 9, 14), Decl(importer.js, 10, 14), Decl(importer.js, 11, 13) ... and 2 more) ->bad2 : Symbol(bad2, Decl(mod1.js, 13, 44)) +>mod.bad2 : Symbol(mod.bad2, Decl(mod1.js, 13, 44)) +>mod : Symbol(mod, Decl(importer.js, 0, 5)) +>bad2 : Symbol(mod.bad2, Decl(mod1.js, 13, 44)) mod.bad3; ->mod.bad3 : Symbol(bad3, Decl(mod1.js, 14, 77)) ->mod : Symbol(mod, Decl(importer.js, 0, 5), Decl(importer.js, 6, 9), Decl(importer.js, 9, 14), Decl(importer.js, 10, 14), Decl(importer.js, 11, 13) ... and 2 more) ->bad3 : Symbol(bad3, Decl(mod1.js, 14, 77)) +>mod.bad3 : Symbol(mod.bad3, Decl(mod1.js, 14, 77)) +>mod : Symbol(mod, Decl(importer.js, 0, 5)) +>bad3 : Symbol(mod.bad3, Decl(mod1.js, 14, 77)) mod.thing = 0; ->mod.thing : Symbol(thing, Decl(mod1.js, 0, 42)) ->mod : Symbol(mod, Decl(importer.js, 0, 5), Decl(importer.js, 6, 9), Decl(importer.js, 9, 14), Decl(importer.js, 10, 14), Decl(importer.js, 11, 13) ... and 2 more) ->thing : Symbol(thing, Decl(mod1.js, 0, 42)) +>mod.thing : Symbol(mod.thing, Decl(mod1.js, 0, 42)) +>mod : Symbol(mod, Decl(importer.js, 0, 5)) +>thing : Symbol(mod.thing, Decl(mod1.js, 0, 42)) mod.other = 0; ->mod : Symbol(mod, Decl(importer.js, 0, 5), Decl(importer.js, 6, 9), Decl(importer.js, 9, 14), Decl(importer.js, 10, 14), Decl(importer.js, 11, 13) ... and 2 more) +>mod : Symbol(mod, Decl(importer.js, 0, 5)) mod.prop = 0; ->mod : Symbol(mod, Decl(importer.js, 0, 5), Decl(importer.js, 6, 9), Decl(importer.js, 9, 14), Decl(importer.js, 10, 14), Decl(importer.js, 11, 13) ... and 2 more) +>mod : Symbol(mod, Decl(importer.js, 0, 5)) mod.bad1 = 0; ->mod.bad1 : Symbol(bad1, Decl(mod1.js, 10, 72)) ->mod : Symbol(mod, Decl(importer.js, 0, 5), Decl(importer.js, 6, 9), Decl(importer.js, 9, 14), Decl(importer.js, 10, 14), Decl(importer.js, 11, 13) ... and 2 more) ->bad1 : Symbol(bad1, Decl(mod1.js, 10, 72)) +>mod.bad1 : Symbol(mod.bad1, Decl(mod1.js, 10, 72)) +>mod : Symbol(mod, Decl(importer.js, 0, 5)) +>bad1 : Symbol(mod.bad1, Decl(mod1.js, 10, 72)) mod.bad2 = 0; ->mod.bad2 : Symbol(bad2, Decl(mod1.js, 13, 44)) ->mod : Symbol(mod, Decl(importer.js, 0, 5), Decl(importer.js, 6, 9), Decl(importer.js, 9, 14), Decl(importer.js, 10, 14), Decl(importer.js, 11, 13) ... and 2 more) ->bad2 : Symbol(bad2, Decl(mod1.js, 13, 44)) +>mod.bad2 : Symbol(mod.bad2, Decl(mod1.js, 13, 44)) +>mod : Symbol(mod, Decl(importer.js, 0, 5)) +>bad2 : Symbol(mod.bad2, Decl(mod1.js, 13, 44)) mod.bad3 = 0; ->mod.bad3 : Symbol(bad3, Decl(mod1.js, 14, 77)) ->mod : Symbol(mod, Decl(importer.js, 0, 5), Decl(importer.js, 6, 9), Decl(importer.js, 9, 14), Decl(importer.js, 10, 14), Decl(importer.js, 11, 13) ... and 2 more) ->bad3 : Symbol(bad3, Decl(mod1.js, 14, 77)) +>mod.bad3 : Symbol(mod.bad3, Decl(mod1.js, 14, 77)) +>mod : Symbol(mod, Decl(importer.js, 0, 5)) +>bad3 : Symbol(mod.bad3, Decl(mod1.js, 14, 77)) === tests/cases/conformance/jsdoc/mod1.js === const obj = { value: 42, writable: true }; diff --git a/tests/baselines/reference/checkOtherObjectAssignProperty.types b/tests/baselines/reference/checkOtherObjectAssignProperty.types index d9b68d71745..950e1266154 100644 --- a/tests/baselines/reference/checkOtherObjectAssignProperty.types +++ b/tests/baselines/reference/checkOtherObjectAssignProperty.types @@ -1,80 +1,80 @@ === tests/cases/conformance/jsdoc/importer.js === const mod = require("./mod1"); ->mod : typeof import("tests/cases/conformance/jsdoc/mod1") ->require("./mod1") : typeof import("tests/cases/conformance/jsdoc/mod1") +>mod : typeof mod +>require("./mod1") : typeof mod >require : any >"./mod1" : "./mod1" mod.thing; >mod.thing : number ->mod : typeof import("tests/cases/conformance/jsdoc/mod1") +>mod : typeof mod >thing : number mod.other; >mod.other : any ->mod : typeof import("tests/cases/conformance/jsdoc/mod1") +>mod : typeof mod >other : any mod.prop; >mod.prop : any ->mod : typeof import("tests/cases/conformance/jsdoc/mod1") +>mod : typeof mod >prop : any mod.bad1; >mod.bad1 : any ->mod : typeof import("tests/cases/conformance/jsdoc/mod1") +>mod : typeof mod >bad1 : any mod.bad2; >mod.bad2 : string ->mod : typeof import("tests/cases/conformance/jsdoc/mod1") +>mod : typeof mod >bad2 : string mod.bad3; >mod.bad3 : any ->mod : typeof import("tests/cases/conformance/jsdoc/mod1") +>mod : typeof mod >bad3 : any mod.thing = 0; >mod.thing = 0 : 0 >mod.thing : number ->mod : typeof import("tests/cases/conformance/jsdoc/mod1") +>mod : typeof mod >thing : number >0 : 0 mod.other = 0; >mod.other = 0 : 0 >mod.other : any ->mod : typeof import("tests/cases/conformance/jsdoc/mod1") +>mod : typeof mod >other : any >0 : 0 mod.prop = 0; >mod.prop = 0 : 0 >mod.prop : any ->mod : typeof import("tests/cases/conformance/jsdoc/mod1") +>mod : typeof mod >prop : any >0 : 0 mod.bad1 = 0; >mod.bad1 = 0 : 0 >mod.bad1 : any ->mod : typeof import("tests/cases/conformance/jsdoc/mod1") +>mod : typeof mod >bad1 : any >0 : 0 mod.bad2 = 0; >mod.bad2 = 0 : 0 >mod.bad2 : any ->mod : typeof import("tests/cases/conformance/jsdoc/mod1") +>mod : typeof mod >bad2 : any >0 : 0 mod.bad3 = 0; >mod.bad3 = 0 : 0 >mod.bad3 : any ->mod : typeof import("tests/cases/conformance/jsdoc/mod1") +>mod : typeof mod >bad3 : any >0 : 0 diff --git a/tests/baselines/reference/circularBaseTypes.errors.txt b/tests/baselines/reference/circularBaseTypes.errors.txt new file mode 100644 index 00000000000..e8a4f4175ae --- /dev/null +++ b/tests/baselines/reference/circularBaseTypes.errors.txt @@ -0,0 +1,19 @@ +tests/cases/compiler/circularBaseTypes.ts(4,11): error TS2310: Type 'M2' recursively references itself as a base type. +tests/cases/compiler/circularBaseTypes.ts(5,6): error TS2456: Type alias 'M3' circularly references itself. + + +==== tests/cases/compiler/circularBaseTypes.ts (2 errors) ==== + // Repro from #38098 + + type M = { value: T }; + interface M2 extends M {}; // Error + ~~ +!!! error TS2310: Type 'M2' recursively references itself as a base type. + type M3 = M2[keyof M2]; // Error + ~~ +!!! error TS2456: Type alias 'M3' circularly references itself. + + function f(m: M3) { + return m.value; + } + \ No newline at end of file diff --git a/tests/baselines/reference/circularBaseTypes.js b/tests/baselines/reference/circularBaseTypes.js new file mode 100644 index 00000000000..1c5f77c1b2e --- /dev/null +++ b/tests/baselines/reference/circularBaseTypes.js @@ -0,0 +1,29 @@ +//// [circularBaseTypes.ts] +// Repro from #38098 + +type M = { value: T }; +interface M2 extends M {}; // Error +type M3 = M2[keyof M2]; // Error + +function f(m: M3) { + return m.value; +} + + +//// [circularBaseTypes.js] +"use strict"; +// Repro from #38098 +; // Error +function f(m) { + return m.value; +} + + +//// [circularBaseTypes.d.ts] +declare type M = { + value: T; +}; +interface M2 extends M { +} +declare type M3 = M2[keyof M2]; +declare function f(m: M3): any; diff --git a/tests/baselines/reference/circularBaseTypes.symbols b/tests/baselines/reference/circularBaseTypes.symbols new file mode 100644 index 00000000000..9acd4d6928b --- /dev/null +++ b/tests/baselines/reference/circularBaseTypes.symbols @@ -0,0 +1,28 @@ +=== tests/cases/compiler/circularBaseTypes.ts === +// Repro from #38098 + +type M = { value: T }; +>M : Symbol(M, Decl(circularBaseTypes.ts, 0, 0)) +>T : Symbol(T, Decl(circularBaseTypes.ts, 2, 7)) +>value : Symbol(value, Decl(circularBaseTypes.ts, 2, 13)) +>T : Symbol(T, Decl(circularBaseTypes.ts, 2, 7)) + +interface M2 extends M {}; // Error +>M2 : Symbol(M2, Decl(circularBaseTypes.ts, 2, 25)) +>M : Symbol(M, Decl(circularBaseTypes.ts, 0, 0)) +>M3 : Symbol(M3, Decl(circularBaseTypes.ts, 3, 30)) + +type M3 = M2[keyof M2]; // Error +>M3 : Symbol(M3, Decl(circularBaseTypes.ts, 3, 30)) +>M2 : Symbol(M2, Decl(circularBaseTypes.ts, 2, 25)) +>M2 : Symbol(M2, Decl(circularBaseTypes.ts, 2, 25)) + +function f(m: M3) { +>f : Symbol(f, Decl(circularBaseTypes.ts, 4, 23)) +>m : Symbol(m, Decl(circularBaseTypes.ts, 6, 11)) +>M3 : Symbol(M3, Decl(circularBaseTypes.ts, 3, 30)) + + return m.value; +>m : Symbol(m, Decl(circularBaseTypes.ts, 6, 11)) +} + diff --git a/tests/baselines/reference/circularBaseTypes.types b/tests/baselines/reference/circularBaseTypes.types new file mode 100644 index 00000000000..59dce43d19e --- /dev/null +++ b/tests/baselines/reference/circularBaseTypes.types @@ -0,0 +1,21 @@ +=== tests/cases/compiler/circularBaseTypes.ts === +// Repro from #38098 + +type M = { value: T }; +>M : M +>value : T + +interface M2 extends M {}; // Error +type M3 = M2[keyof M2]; // Error +>M3 : any + +function f(m: M3) { +>f : (m: any) => any +>m : any + + return m.value; +>m.value : any +>m : any +>value : any +} + diff --git a/tests/baselines/reference/circularConstraintYieldsAppropriateError.errors.txt b/tests/baselines/reference/circularConstraintYieldsAppropriateError.errors.txt new file mode 100644 index 00000000000..709b3957561 --- /dev/null +++ b/tests/baselines/reference/circularConstraintYieldsAppropriateError.errors.txt @@ -0,0 +1,23 @@ +tests/cases/compiler/circularConstraintYieldsAppropriateError.ts(10,7): error TS2310: Type 'Foo' recursively references itself as a base type. + + +==== tests/cases/compiler/circularConstraintYieldsAppropriateError.ts (1 errors) ==== + // https://github.com/Microsoft/TypeScript/issues/16861 + class BaseType { + bar: T + } + + class NextType extends BaseType { + baz: string; + } + + class Foo extends NextType { + ~~~ +!!! error TS2310: Type 'Foo' recursively references itself as a base type. + someProp: { + test: true + } + } + + const foo = new Foo(); + foo.bar.test \ No newline at end of file diff --git a/tests/baselines/reference/classAbstractMixedWithModifiers.errors.txt b/tests/baselines/reference/classAbstractMixedWithModifiers.errors.txt index 121c1739632..eb8d5af760c 100644 --- a/tests/baselines/reference/classAbstractMixedWithModifiers.errors.txt +++ b/tests/baselines/reference/classAbstractMixedWithModifiers.errors.txt @@ -3,19 +3,21 @@ tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbst tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMixedWithModifiers.ts(9,14): error TS1029: 'protected' modifier must precede 'abstract' modifier. tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMixedWithModifiers.ts(10,14): error TS1243: 'private' modifier cannot be used with 'abstract' modifier. tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMixedWithModifiers.ts(12,14): error TS1243: 'static' modifier cannot be used with 'abstract' modifier. -tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMixedWithModifiers.ts(14,12): error TS1243: 'static' modifier cannot be used with 'abstract' modifier. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMixedWithModifiers.ts(13,12): error TS1243: 'static' modifier cannot be used with 'abstract' modifier. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMixedWithModifiers.ts(15,14): error TS1243: 'async' modifier cannot be used with 'abstract' modifier. +tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMixedWithModifiers.ts(16,5): error TS1243: 'async' modifier cannot be used with 'abstract' modifier. -==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMixedWithModifiers.ts (6 errors) ==== +==== tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbstractMixedWithModifiers.ts (8 errors) ==== abstract class A { abstract foo_a(); - + public abstract foo_b(); protected abstract foo_c(); private abstract foo_d(); ~~~~~~~~ !!! error TS1243: 'private' modifier cannot be used with 'abstract' modifier. - + abstract public foo_bb(); ~~~~~~ !!! error TS1029: 'public' modifier must precede 'abstract' modifier. @@ -25,12 +27,19 @@ tests/cases/conformance/classes/classDeclarations/classAbstractKeyword/classAbst abstract private foo_dd(); ~~~~~~~ !!! error TS1243: 'private' modifier cannot be used with 'abstract' modifier. - + abstract static foo_d(); ~~~~~~ !!! error TS1243: 'static' modifier cannot be used with 'abstract' modifier. - static abstract foo_e(); ~~~~~~~~ !!! error TS1243: 'static' modifier cannot be used with 'abstract' modifier. - } \ No newline at end of file + + abstract async foo_f(); + ~~~~~ +!!! error TS1243: 'async' modifier cannot be used with 'abstract' modifier. + async abstract foo_g(); + ~~~~~ +!!! error TS1243: 'async' modifier cannot be used with 'abstract' modifier. + } + \ No newline at end of file diff --git a/tests/baselines/reference/classAbstractMixedWithModifiers.js b/tests/baselines/reference/classAbstractMixedWithModifiers.js index 77e6c83431c..70a08978c7c 100644 --- a/tests/baselines/reference/classAbstractMixedWithModifiers.js +++ b/tests/baselines/reference/classAbstractMixedWithModifiers.js @@ -1,19 +1,22 @@ //// [classAbstractMixedWithModifiers.ts] abstract class A { abstract foo_a(); - + public abstract foo_b(); protected abstract foo_c(); private abstract foo_d(); - + abstract public foo_bb(); abstract protected foo_cc(); abstract private foo_dd(); - + abstract static foo_d(); - static abstract foo_e(); -} + + abstract async foo_f(); + async abstract foo_g(); +} + //// [classAbstractMixedWithModifiers.js] var A = /** @class */ (function () { diff --git a/tests/baselines/reference/classAbstractMixedWithModifiers.symbols b/tests/baselines/reference/classAbstractMixedWithModifiers.symbols index df5b8c67312..3204ba89dd9 100644 --- a/tests/baselines/reference/classAbstractMixedWithModifiers.symbols +++ b/tests/baselines/reference/classAbstractMixedWithModifiers.symbols @@ -4,7 +4,7 @@ abstract class A { abstract foo_a(); >foo_a : Symbol(A.foo_a, Decl(classAbstractMixedWithModifiers.ts, 0, 18)) - + public abstract foo_b(); >foo_b : Symbol(A.foo_b, Decl(classAbstractMixedWithModifiers.ts, 1, 21)) @@ -13,7 +13,7 @@ abstract class A { private abstract foo_d(); >foo_d : Symbol(A.foo_d, Decl(classAbstractMixedWithModifiers.ts, 4, 31)) - + abstract public foo_bb(); >foo_bb : Symbol(A.foo_bb, Decl(classAbstractMixedWithModifiers.ts, 5, 29)) @@ -22,10 +22,17 @@ abstract class A { abstract private foo_dd(); >foo_dd : Symbol(A.foo_dd, Decl(classAbstractMixedWithModifiers.ts, 8, 32)) - + abstract static foo_d(); >foo_d : Symbol(A.foo_d, Decl(classAbstractMixedWithModifiers.ts, 9, 30)) - + static abstract foo_e(); >foo_e : Symbol(A.foo_e, Decl(classAbstractMixedWithModifiers.ts, 11, 28)) + + abstract async foo_f(); +>foo_f : Symbol(A.foo_f, Decl(classAbstractMixedWithModifiers.ts, 12, 28)) + + async abstract foo_g(); +>foo_g : Symbol(A.foo_g, Decl(classAbstractMixedWithModifiers.ts, 14, 27)) } + diff --git a/tests/baselines/reference/classAbstractMixedWithModifiers.types b/tests/baselines/reference/classAbstractMixedWithModifiers.types index 4601127ca87..bf210099bbf 100644 --- a/tests/baselines/reference/classAbstractMixedWithModifiers.types +++ b/tests/baselines/reference/classAbstractMixedWithModifiers.types @@ -4,7 +4,7 @@ abstract class A { abstract foo_a(); >foo_a : () => any - + public abstract foo_b(); >foo_b : () => any @@ -13,7 +13,7 @@ abstract class A { private abstract foo_d(); >foo_d : () => any - + abstract public foo_bb(); >foo_bb : () => any @@ -22,10 +22,17 @@ abstract class A { abstract private foo_dd(); >foo_dd : () => any - + abstract static foo_d(); >foo_d : () => any - + static abstract foo_e(); >foo_e : () => any + + abstract async foo_f(); +>foo_f : () => any + + async abstract foo_g(); +>foo_g : () => any } + diff --git a/tests/baselines/reference/classImplementsClass6.errors.txt b/tests/baselines/reference/classImplementsClass6.errors.txt index a09ea501554..6900e4730a6 100644 --- a/tests/baselines/reference/classImplementsClass6.errors.txt +++ b/tests/baselines/reference/classImplementsClass6.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/classImplementsClass6.ts(20,3): error TS2339: Property 'bar' does not exist on type 'C'. -tests/cases/compiler/classImplementsClass6.ts(21,4): error TS2576: Property 'bar' is a static member of type 'C2' +tests/cases/compiler/classImplementsClass6.ts(21,4): error TS2576: Property 'bar' is a static member of type 'C2'. ==== tests/cases/compiler/classImplementsClass6.ts (2 errors) ==== @@ -27,4 +27,4 @@ tests/cases/compiler/classImplementsClass6.ts(21,4): error TS2576: Property 'bar !!! error TS2339: Property 'bar' does not exist on type 'C'. c2.bar(); // should error ~~~ -!!! error TS2576: Property 'bar' is a static member of type 'C2' \ No newline at end of file +!!! error TS2576: Property 'bar' is a static member of type 'C2'. \ No newline at end of file diff --git a/tests/baselines/reference/classMemberWithMissingIdentifier2.types b/tests/baselines/reference/classMemberWithMissingIdentifier2.types index 31cae7fe947..591d9177f58 100644 --- a/tests/baselines/reference/classMemberWithMissingIdentifier2.types +++ b/tests/baselines/reference/classMemberWithMissingIdentifier2.types @@ -5,7 +5,7 @@ class C { public {[name:string]:VariableDeclaration}; > : any >[name:string] : any[] ->name : never +>name : void >string : any >VariableDeclaration : any } diff --git a/tests/baselines/reference/classSideInheritance1.errors.txt b/tests/baselines/reference/classSideInheritance1.errors.txt index 6598ccbfd5c..3b12ae86f99 100644 --- a/tests/baselines/reference/classSideInheritance1.errors.txt +++ b/tests/baselines/reference/classSideInheritance1.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/classSideInheritance1.ts(12,3): error TS2576: Property 'bar' is a static member of type 'A' -tests/cases/compiler/classSideInheritance1.ts(13,3): error TS2576: Property 'bar' is a static member of type 'C2' +tests/cases/compiler/classSideInheritance1.ts(12,3): error TS2576: Property 'bar' is a static member of type 'A'. +tests/cases/compiler/classSideInheritance1.ts(13,3): error TS2576: Property 'bar' is a static member of type 'C2'. ==== tests/cases/compiler/classSideInheritance1.ts (2 errors) ==== @@ -16,9 +16,9 @@ tests/cases/compiler/classSideInheritance1.ts(13,3): error TS2576: Property 'bar var c: C2; a.bar(); // static off an instance - should be an error ~~~ -!!! error TS2576: Property 'bar' is a static member of type 'A' +!!! error TS2576: Property 'bar' is a static member of type 'A'. c.bar(); // static off an instance - should be an error ~~~ -!!! error TS2576: Property 'bar' is a static member of type 'C2' +!!! error TS2576: Property 'bar' is a static member of type 'C2'. A.bar(); // valid C2.bar(); // valid \ No newline at end of file diff --git a/tests/baselines/reference/classSideInheritance3.errors.txt b/tests/baselines/reference/classSideInheritance3.errors.txt index c845defa5b8..cdad6599715 100644 --- a/tests/baselines/reference/classSideInheritance3.errors.txt +++ b/tests/baselines/reference/classSideInheritance3.errors.txt @@ -1,5 +1,9 @@ tests/cases/compiler/classSideInheritance3.ts(16,5): error TS2322: Type 'typeof B' is not assignable to type 'typeof A'. + Types of construct signatures are incompatible. + Type 'new (x: string, data: string) => B' is not assignable to type 'new (x: string) => A'. tests/cases/compiler/classSideInheritance3.ts(17,5): error TS2322: Type 'typeof B' is not assignable to type 'new (x: string) => A'. + Types of construct signatures are incompatible. + Type 'new (x: string, data: string) => B' is not assignable to type 'new (x: string) => A'. ==== tests/cases/compiler/classSideInheritance3.ts (2 errors) ==== @@ -21,7 +25,11 @@ tests/cases/compiler/classSideInheritance3.ts(17,5): error TS2322: Type 'typeof var r1: typeof A = B; // error ~~ !!! error TS2322: Type 'typeof B' is not assignable to type 'typeof A'. +!!! error TS2322: Types of construct signatures are incompatible. +!!! error TS2322: Type 'new (x: string, data: string) => B' is not assignable to type 'new (x: string) => A'. var r2: new (x: string) => A = B; // error ~~ !!! error TS2322: Type 'typeof B' is not assignable to type 'new (x: string) => A'. +!!! error TS2322: Types of construct signatures are incompatible. +!!! error TS2322: Type 'new (x: string, data: string) => B' is not assignable to type 'new (x: string) => A'. var r3: typeof A = C; // ok \ No newline at end of file diff --git a/tests/baselines/reference/classStaticPropertyAccess.errors.txt b/tests/baselines/reference/classStaticPropertyAccess.errors.txt index b54caae998e..21d98be35b8 100644 --- a/tests/baselines/reference/classStaticPropertyAccess.errors.txt +++ b/tests/baselines/reference/classStaticPropertyAccess.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/classStaticPropertyAccess.ts(9,1): error TS2576: Property 'y' is a static member of type 'A' -tests/cases/compiler/classStaticPropertyAccess.ts(10,3): error TS2576: Property 'y' is a static member of type 'A' +tests/cases/compiler/classStaticPropertyAccess.ts(9,1): error TS2576: Property 'y' is a static member of type 'A'. +tests/cases/compiler/classStaticPropertyAccess.ts(10,3): error TS2576: Property 'y' is a static member of type 'A'. tests/cases/compiler/classStaticPropertyAccess.ts(11,3): error TS2341: Property '_b' is private and only accessible within class 'A'. tests/cases/compiler/classStaticPropertyAccess.ts(12,3): error TS2339: Property 'a' does not exist on type 'typeof A'. @@ -15,10 +15,10 @@ tests/cases/compiler/classStaticPropertyAccess.ts(12,3): error TS2339: Property a['y'] // Error ~~~~~~ -!!! error TS2576: Property 'y' is a static member of type 'A' +!!! error TS2576: Property 'y' is a static member of type 'A'. a.y // Error ~ -!!! error TS2576: Property 'y' is a static member of type 'A' +!!! error TS2576: Property 'y' is a static member of type 'A'. A._b // Error ~~ !!! error TS2341: Property '_b' is private and only accessible within class 'A'. diff --git a/tests/baselines/reference/cloduleTest2.errors.txt b/tests/baselines/reference/cloduleTest2.errors.txt index 9cc6053c1c7..8569868e7b0 100644 --- a/tests/baselines/reference/cloduleTest2.errors.txt +++ b/tests/baselines/reference/cloduleTest2.errors.txt @@ -1,8 +1,8 @@ tests/cases/compiler/cloduleTest2.ts(4,13): error TS2554: Expected 1 arguments, but got 0. tests/cases/compiler/cloduleTest2.ts(10,13): error TS2554: Expected 1 arguments, but got 0. -tests/cases/compiler/cloduleTest2.ts(18,7): error TS2576: Property 'bar' is a static member of type 'm3d' +tests/cases/compiler/cloduleTest2.ts(18,7): error TS2576: Property 'bar' is a static member of type 'm3d'. tests/cases/compiler/cloduleTest2.ts(19,7): error TS2339: Property 'y' does not exist on type 'm3d'. -tests/cases/compiler/cloduleTest2.ts(27,7): error TS2576: Property 'bar' is a static member of type 'm3d' +tests/cases/compiler/cloduleTest2.ts(27,7): error TS2576: Property 'bar' is a static member of type 'm3d'. tests/cases/compiler/cloduleTest2.ts(28,7): error TS2339: Property 'y' does not exist on type 'm3d'. tests/cases/compiler/cloduleTest2.ts(33,9): error TS2554: Expected 1 arguments, but got 0. tests/cases/compiler/cloduleTest2.ts(36,10): error TS2554: Expected 1 arguments, but got 0. @@ -34,7 +34,7 @@ tests/cases/compiler/cloduleTest2.ts(36,10): error TS2554: Expected 1 arguments, r.foo(); r.bar(); // error ~~~ -!!! error TS2576: Property 'bar' is a static member of type 'm3d' +!!! error TS2576: Property 'bar' is a static member of type 'm3d'. r.y; // error ~ !!! error TS2339: Property 'y' does not exist on type 'm3d'. @@ -47,7 +47,7 @@ tests/cases/compiler/cloduleTest2.ts(36,10): error TS2554: Expected 1 arguments, r.foo(); r.bar(); // error ~~~ -!!! error TS2576: Property 'bar' is a static member of type 'm3d' +!!! error TS2576: Property 'bar' is a static member of type 'm3d'. r.y; // error ~ !!! error TS2339: Property 'y' does not exist on type 'm3d'. diff --git a/tests/baselines/reference/commentOnImportStatement1.errors.txt b/tests/baselines/reference/commentOnImportStatement1.errors.txt index 5fb5009fa23..e6dd806ff6a 100644 --- a/tests/baselines/reference/commentOnImportStatement1.errors.txt +++ b/tests/baselines/reference/commentOnImportStatement1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot find module './foo' or its corresponding type declarations. +tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2792: Cannot find module './foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/commentOnImportStatement1.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/commentOnImportStatement1.ts(3,22): error TS2307: Cannot fi import foo = require('./foo'); ~~~~~~~ -!!! error TS2307: Cannot find module './foo' or its corresponding type declarations. +!!! error TS2792: Cannot find module './foo'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? \ No newline at end of file diff --git a/tests/baselines/reference/commonJSImportClassTypeReference.js b/tests/baselines/reference/commonJSImportClassTypeReference.js new file mode 100644 index 00000000000..3d860455301 --- /dev/null +++ b/tests/baselines/reference/commonJSImportClassTypeReference.js @@ -0,0 +1,44 @@ +//// [tests/cases/conformance/salsa/commonJSImportClassTypeReference.ts] //// + +//// [main.js] +const { K } = require("./mod1"); +/** @param {K} k */ +function f(k) { + k.values() +} + +//// [mod1.js] +class K { + values() { + return new K() + } +} +exports.K = K; + + +//// [mod1.js] +"use strict"; +var K = /** @class */ (function () { + function K() { + } + K.prototype.values = function () { + return new K(); + }; + return K; +}()); +exports.K = K; +//// [main.js] +"use strict"; +var K = require("./mod1").K; +/** @param {K} k */ +function f(k) { + k.values(); +} + + +//// [mod1.d.ts] +export class K { + values(): K; +} +//// [main.d.ts] +export {}; diff --git a/tests/baselines/reference/commonJSImportClassTypeReference.symbols b/tests/baselines/reference/commonJSImportClassTypeReference.symbols new file mode 100644 index 00000000000..f0d1198c71a --- /dev/null +++ b/tests/baselines/reference/commonJSImportClassTypeReference.symbols @@ -0,0 +1,34 @@ +=== tests/cases/conformance/salsa/main.js === +const { K } = require("./mod1"); +>K : Symbol(K, Decl(main.js, 0, 7)) +>require : Symbol(require) +>"./mod1" : Symbol("tests/cases/conformance/salsa/mod1", Decl(mod1.js, 0, 0)) + +/** @param {K} k */ +function f(k) { +>f : Symbol(f, Decl(main.js, 0, 32)) +>k : Symbol(k, Decl(main.js, 2, 11)) + + k.values() +>k.values : Symbol(K.values, Decl(mod1.js, 0, 9)) +>k : Symbol(k, Decl(main.js, 2, 11)) +>values : Symbol(K.values, Decl(mod1.js, 0, 9)) +} + +=== tests/cases/conformance/salsa/mod1.js === +class K { +>K : Symbol(K, Decl(mod1.js, 0, 0)) + + values() { +>values : Symbol(K.values, Decl(mod1.js, 0, 9)) + + return new K() +>K : Symbol(K, Decl(mod1.js, 0, 0)) + } +} +exports.K = K; +>exports.K : Symbol(K, Decl(mod1.js, 4, 1)) +>exports : Symbol(K, Decl(mod1.js, 4, 1)) +>K : Symbol(K, Decl(mod1.js, 4, 1)) +>K : Symbol(K, Decl(mod1.js, 0, 0)) + diff --git a/tests/baselines/reference/commonJSImportClassTypeReference.types b/tests/baselines/reference/commonJSImportClassTypeReference.types new file mode 100644 index 00000000000..edbd688f01f --- /dev/null +++ b/tests/baselines/reference/commonJSImportClassTypeReference.types @@ -0,0 +1,38 @@ +=== tests/cases/conformance/salsa/main.js === +const { K } = require("./mod1"); +>K : typeof K +>require("./mod1") : typeof import("tests/cases/conformance/salsa/mod1") +>require : any +>"./mod1" : "./mod1" + +/** @param {K} k */ +function f(k) { +>f : (k: K) => void +>k : K + + k.values() +>k.values() : K +>k.values : () => K +>k : K +>values : () => K +} + +=== tests/cases/conformance/salsa/mod1.js === +class K { +>K : K + + values() { +>values : () => K + + return new K() +>new K() : K +>K : typeof K + } +} +exports.K = K; +>exports.K = K : typeof K +>exports.K : typeof K +>exports : typeof import("tests/cases/conformance/salsa/mod1") +>K : typeof K +>K : typeof K + diff --git a/tests/baselines/reference/commonJSImportExportedClassExpression.js b/tests/baselines/reference/commonJSImportExportedClassExpression.js new file mode 100644 index 00000000000..7eb15b08e87 --- /dev/null +++ b/tests/baselines/reference/commonJSImportExportedClassExpression.js @@ -0,0 +1,40 @@ +//// [tests/cases/conformance/salsa/commonJSImportExportedClassExpression.ts] //// + +//// [main.js] +const { K } = require("./mod1"); +/** @param {K} k */ +function f(k) { + k.values() +} + +//// [mod1.js] +exports.K = class K { + values() { + } +}; + + +//// [mod1.js] +"use strict"; +exports.K = /** @class */ (function () { + function K() { + } + K.prototype.values = function () { + }; + return K; +}()); +//// [main.js] +"use strict"; +var K = require("./mod1").K; +/** @param {K} k */ +function f(k) { + k.values(); +} + + +//// [mod1.d.ts] +export class K { + values(): void; +} +//// [main.d.ts] +export {}; diff --git a/tests/baselines/reference/commonJSImportExportedClassExpression.symbols b/tests/baselines/reference/commonJSImportExportedClassExpression.symbols new file mode 100644 index 00000000000..25f9f440bfb --- /dev/null +++ b/tests/baselines/reference/commonJSImportExportedClassExpression.symbols @@ -0,0 +1,29 @@ +=== tests/cases/conformance/salsa/main.js === +const { K } = require("./mod1"); +>K : Symbol(K, Decl(main.js, 0, 7)) +>require : Symbol(require) +>"./mod1" : Symbol("tests/cases/conformance/salsa/mod1", Decl(mod1.js, 0, 0)) + +/** @param {K} k */ +function f(k) { +>f : Symbol(f, Decl(main.js, 0, 32)) +>k : Symbol(k, Decl(main.js, 2, 11)) + + k.values() +>k.values : Symbol(K.values, Decl(mod1.js, 0, 21)) +>k : Symbol(k, Decl(main.js, 2, 11)) +>values : Symbol(K.values, Decl(mod1.js, 0, 21)) +} + +=== tests/cases/conformance/salsa/mod1.js === +exports.K = class K { +>exports.K : Symbol(K, Decl(mod1.js, 0, 0)) +>exports : Symbol(K, Decl(mod1.js, 0, 0)) +>K : Symbol(K, Decl(mod1.js, 0, 0)) +>K : Symbol(K, Decl(mod1.js, 0, 11)) + + values() { +>values : Symbol(K.values, Decl(mod1.js, 0, 21)) + } +}; + diff --git a/tests/baselines/reference/commonJSImportExportedClassExpression.types b/tests/baselines/reference/commonJSImportExportedClassExpression.types new file mode 100644 index 00000000000..f7c5b90541e --- /dev/null +++ b/tests/baselines/reference/commonJSImportExportedClassExpression.types @@ -0,0 +1,33 @@ +=== tests/cases/conformance/salsa/main.js === +const { K } = require("./mod1"); +>K : typeof K +>require("./mod1") : typeof import("tests/cases/conformance/salsa/mod1") +>require : any +>"./mod1" : "./mod1" + +/** @param {K} k */ +function f(k) { +>f : (k: K) => void +>k : K + + k.values() +>k.values() : void +>k.values : () => void +>k : K +>values : () => void +} + +=== tests/cases/conformance/salsa/mod1.js === +exports.K = class K { +>exports.K = class K { values() { }} : typeof K +>exports.K : typeof K +>exports : typeof import("tests/cases/conformance/salsa/mod1") +>K : typeof K +>class K { values() { }} : typeof K +>K : typeof K + + values() { +>values : () => void + } +}; + diff --git a/tests/baselines/reference/commonJSImportNestedClassTypeReference.js b/tests/baselines/reference/commonJSImportNestedClassTypeReference.js new file mode 100644 index 00000000000..24dc221a727 --- /dev/null +++ b/tests/baselines/reference/commonJSImportNestedClassTypeReference.js @@ -0,0 +1,48 @@ +//// [tests/cases/conformance/salsa/commonJSImportNestedClassTypeReference.ts] //// + +//// [main.js] +const { K } = require("./mod1"); +/** @param {K} k */ +function f(k) { + k.values() +} + +//// [mod1.js] +var NS = {} +NS.K =class { + values() { + return new NS.K() + } +} +exports.K = NS.K; + + +//// [mod1.js] +"use strict"; +var NS = {}; +NS.K = /** @class */ (function () { + function K() { + } + K.prototype.values = function () { + return new NS.K(); + }; + return K; +}()); +exports.K = NS.K; +//// [main.js] +"use strict"; +var K = require("./mod1").K; +/** @param {K} k */ +function f(k) { + k.values(); +} + + +//// [mod1.d.ts] +export var K: { + new (): { + values(): any; + }; +}; +//// [main.d.ts] +export {}; diff --git a/tests/baselines/reference/commonJSImportNestedClassTypeReference.symbols b/tests/baselines/reference/commonJSImportNestedClassTypeReference.symbols new file mode 100644 index 00000000000..fe96f34558a --- /dev/null +++ b/tests/baselines/reference/commonJSImportNestedClassTypeReference.symbols @@ -0,0 +1,43 @@ +=== tests/cases/conformance/salsa/main.js === +const { K } = require("./mod1"); +>K : Symbol(K, Decl(main.js, 0, 7)) +>require : Symbol(require) +>"./mod1" : Symbol("tests/cases/conformance/salsa/mod1", Decl(mod1.js, 0, 0)) + +/** @param {K} k */ +function f(k) { +>f : Symbol(f, Decl(main.js, 0, 32)) +>k : Symbol(k, Decl(main.js, 2, 11)) + + k.values() +>k.values : Symbol(K.values, Decl(mod1.js, 1, 13)) +>k : Symbol(k, Decl(main.js, 2, 11)) +>values : Symbol(K.values, Decl(mod1.js, 1, 13)) +} + +=== tests/cases/conformance/salsa/mod1.js === +var NS = {} +>NS : Symbol(NS, Decl(mod1.js, 0, 3), Decl(mod1.js, 0, 11)) + +NS.K =class { +>NS.K : Symbol(K, Decl(mod1.js, 0, 11)) +>NS : Symbol(NS, Decl(mod1.js, 0, 3), Decl(mod1.js, 0, 11)) +>K : Symbol(K, Decl(mod1.js, 0, 11)) + + values() { +>values : Symbol(K.values, Decl(mod1.js, 1, 13)) + + return new NS.K() +>NS.K : Symbol(K, Decl(mod1.js, 0, 11)) +>NS : Symbol(NS, Decl(mod1.js, 0, 3), Decl(mod1.js, 0, 11)) +>K : Symbol(K, Decl(mod1.js, 0, 11)) + } +} +exports.K = NS.K; +>exports.K : Symbol(K, Decl(mod1.js, 5, 1)) +>exports : Symbol(K, Decl(mod1.js, 5, 1)) +>K : Symbol(K, Decl(mod1.js, 5, 1)) +>NS.K : Symbol(K, Decl(mod1.js, 0, 11)) +>NS : Symbol(NS, Decl(mod1.js, 0, 3), Decl(mod1.js, 0, 11)) +>K : Symbol(K, Decl(mod1.js, 0, 11)) + diff --git a/tests/baselines/reference/commonJSImportNestedClassTypeReference.types b/tests/baselines/reference/commonJSImportNestedClassTypeReference.types new file mode 100644 index 00000000000..f5b746cbd9f --- /dev/null +++ b/tests/baselines/reference/commonJSImportNestedClassTypeReference.types @@ -0,0 +1,50 @@ +=== tests/cases/conformance/salsa/main.js === +const { K } = require("./mod1"); +>K : typeof K +>require("./mod1") : typeof import("tests/cases/conformance/salsa/mod1") +>require : any +>"./mod1" : "./mod1" + +/** @param {K} k */ +function f(k) { +>f : (k: K) => void +>k : K + + k.values() +>k.values() : K +>k.values : () => K +>k : K +>values : () => K +} + +=== tests/cases/conformance/salsa/mod1.js === +var NS = {} +>NS : typeof NS +>{} : {} + +NS.K =class { +>NS.K =class { values() { return new NS.K() }} : typeof K +>NS.K : typeof K +>NS : typeof NS +>K : typeof K +>class { values() { return new NS.K() }} : typeof K + + values() { +>values : () => K + + return new NS.K() +>new NS.K() : K +>NS.K : typeof K +>NS : typeof NS +>K : typeof K + } +} +exports.K = NS.K; +>exports.K = NS.K : typeof K +>exports.K : typeof K +>exports : typeof import("tests/cases/conformance/salsa/mod1") +>K : typeof K +>NS.K : typeof K +>NS : typeof NS +>K : typeof K + diff --git a/tests/baselines/reference/complicatedIndexesOfIntersectionsAreInferencable.types b/tests/baselines/reference/complicatedIndexesOfIntersectionsAreInferencable.types index c10b5aa4f8e..2460b5407ef 100644 --- a/tests/baselines/reference/complicatedIndexesOfIntersectionsAreInferencable.types +++ b/tests/baselines/reference/complicatedIndexesOfIntersectionsAreInferencable.types @@ -15,7 +15,7 @@ declare function Func( >Func : (x: (string extends "validate" | "initialValues" | keyof ExtraProps ? Readonly & ExtraProps> : Pick & ExtraProps>, "validate" | "initialValues" | Exclude> & Partial & ExtraProps>, "validateOnChange" | Extract>>)) => void x: (string extends "validate" | "initialValues" | keyof ExtraProps ->x : string extends keyof ExtraProps | "validate" | "initialValues" ? Readonly & ExtraProps> : Pick & ExtraProps>, Exclude | "validate" | "initialValues"> & Partial & ExtraProps>, "validateOnChange" | Extract>> +>x : string extends "validate" | "initialValues" | keyof ExtraProps ? Readonly & ExtraProps> : Pick & ExtraProps>, "validate" | "initialValues" | Exclude> & Partial & ExtraProps>, "validateOnChange" | Extract>> ? Readonly & ExtraProps> : Pick & ExtraProps>, "validate" | "initialValues" | Exclude> @@ -24,7 +24,7 @@ declare function Func( Func({ >Func({ initialValues: { foo: "" }, validate: props => { props.foo; }}) : void ->Func : (x: string extends keyof ExtraProps | "validate" | "initialValues" ? Readonly & ExtraProps> : Pick & ExtraProps>, Exclude | "validate" | "initialValues"> & Partial & ExtraProps>, "validateOnChange" | Extract>>) => void +>Func : (x: string extends "validate" | "initialValues" | keyof ExtraProps ? Readonly & ExtraProps> : Pick & ExtraProps>, "validate" | "initialValues" | Exclude> & Partial & ExtraProps>, "validateOnChange" | Extract>>) => void >{ initialValues: { foo: "" }, validate: props => { props.foo; }} : { initialValues: { foo: string; }; validate: (props: { foo: string; }) => void; } initialValues: { diff --git a/tests/baselines/reference/conditionalOperatorConditionIsObjectType.errors.txt b/tests/baselines/reference/conditionalOperatorConditionIsObjectType.errors.txt index 00adf0fe06e..1f6f1949516 100644 --- a/tests/baselines/reference/conditionalOperatorConditionIsObjectType.errors.txt +++ b/tests/baselines/reference/conditionalOperatorConditionIsObjectType.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(36,1): error TS1345: An expression of type 'void' cannot be tested for truthiness -tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(39,1): error TS1345: An expression of type 'void' cannot be tested for truthiness -tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(58,20): error TS1345: An expression of type 'void' cannot be tested for truthiness -tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(61,23): error TS1345: An expression of type 'void' cannot be tested for truthiness -tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(63,32): error TS1345: An expression of type 'void' cannot be tested for truthiness +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(36,1): error TS1345: An expression of type 'void' cannot be tested for truthiness. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(39,1): error TS1345: An expression of type 'void' cannot be tested for truthiness. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(58,20): error TS1345: An expression of type 'void' cannot be tested for truthiness. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(61,23): error TS1345: An expression of type 'void' cannot be tested for truthiness. +tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts(63,32): error TS1345: An expression of type 'void' cannot be tested for truthiness. ==== tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorConditionIsObjectType.ts (5 errors) ==== @@ -43,12 +43,12 @@ tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorCondit //Cond is an object type expression foo() ? exprAny1 : exprAny2; ~~~~~ -!!! error TS1345: An expression of type 'void' cannot be tested for truthiness +!!! error TS1345: An expression of type 'void' cannot be tested for truthiness. new Date() ? exprBoolean1 : exprBoolean2; new C() ? exprNumber1 : exprNumber2; C.doIt() ? exprString1 : exprString2; ~~~~~~~~ -!!! error TS1345: An expression of type 'void' cannot be tested for truthiness +!!! error TS1345: An expression of type 'void' cannot be tested for truthiness. condObject.valueOf() ? exprIsObject1 : exprIsObject2; new Date() ? exprString1 : exprBoolean1; // union @@ -69,14 +69,14 @@ tests/cases/conformance/expressions/conditonalOperator/conditionalOperatorCondit var resultIsAny3 = foo() ? exprAny1 : exprAny2; ~~~~~ -!!! error TS1345: An expression of type 'void' cannot be tested for truthiness +!!! error TS1345: An expression of type 'void' cannot be tested for truthiness. var resultIsBoolean3 = new Date() ? exprBoolean1 : exprBoolean2; var resultIsNumber3 = new C() ? exprNumber1 : exprNumber2; var resultIsString3 = C.doIt() ? exprString1 : exprString2; ~~~~~~~~ -!!! error TS1345: An expression of type 'void' cannot be tested for truthiness +!!! error TS1345: An expression of type 'void' cannot be tested for truthiness. var resultIsObject3 = condObject.valueOf() ? exprIsObject1 : exprIsObject2; var resultIsStringOrBoolean3 = C.doIt() ? exprString1 : exprBoolean1; // union ~~~~~~~~ -!!! error TS1345: An expression of type 'void' cannot be tested for truthiness +!!! error TS1345: An expression of type 'void' cannot be tested for truthiness. \ No newline at end of file diff --git a/tests/baselines/reference/conflictingCommonJSES2015Exports.errors.txt b/tests/baselines/reference/conflictingCommonJSES2015Exports.errors.txt index 2f47712c9db..30f35bc58ca 100644 --- a/tests/baselines/reference/conflictingCommonJSES2015Exports.errors.txt +++ b/tests/baselines/reference/conflictingCommonJSES2015Exports.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/salsa/bug24934.js(2,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`. +tests/cases/conformance/salsa/bug24934.js(2,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ==== tests/cases/conformance/salsa/bug24934.js (1 errors) ==== export function abc(a, b, c) { return 5; } module.exports = { abc }; ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`. +!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ==== tests/cases/conformance/salsa/use.js (0 errors) ==== import { abc } from './bug24934'; abc(1, 2, 3); diff --git a/tests/baselines/reference/consistentUnionSubtypeReduction.js b/tests/baselines/reference/consistentUnionSubtypeReduction.js new file mode 100644 index 00000000000..ce583be6d33 --- /dev/null +++ b/tests/baselines/reference/consistentUnionSubtypeReduction.js @@ -0,0 +1,100 @@ +//// [consistentUnionSubtypeReduction.ts] +// https://github.com/microsoft/TypeScript/issues/31155 + +declare const MyArray: { + isArray(arg: T | {}): arg is T extends readonly any[] ? (unknown extends T ? never : readonly any[]) : any[]; +}; + +declare const a: readonly string[] | string; +declare const b: string[] | string; +declare const c: unknown; + +if (MyArray.isArray(a)) { + a; // readonly string[] +} +else { + a; // string +} +a; // readonly string[] | string; + +if (MyArray.isArray(b)) { + b; // string[] | string; +} +else { + b; // string +} +b; // string[] | string; + +if (MyArray.isArray(c)) { + c; // any[] +} + + +function f(x: T) { + const a: readonly T[] | string = null!; + const b: T[] | string = null!; + const c: T = null!; + + if (MyArray.isArray(a)) { + a; // readonly T[] + } + else { + a; // string + } + a; // readonly T[] | string; + + if (MyArray.isArray(b)) { + b; // T[] + } + else { + b; // string + } + b; + + if (MyArray.isArray(c)) { + c; // T & (T extends readonly any[] ? readonly any[] : any[]) + } +} + + +//// [consistentUnionSubtypeReduction.js] +// https://github.com/microsoft/TypeScript/issues/31155 +if (MyArray.isArray(a)) { + a; // readonly string[] +} +else { + a; // string +} +a; // readonly string[] | string; +if (MyArray.isArray(b)) { + b; // string[] | string; +} +else { + b; // string +} +b; // string[] | string; +if (MyArray.isArray(c)) { + c; // any[] +} +function f(x) { + var a = null; + var b = null; + var c = null; + if (MyArray.isArray(a)) { + a; // readonly T[] + } + else { + a; // string + } + a; // readonly T[] | string; + if (MyArray.isArray(b)) { + b; // T[] + } + else { + b; // string + } + b; + if (MyArray.isArray(c)) { + c; // T & (T extends readonly any[] ? readonly any[] : any[]) + } +} diff --git a/tests/baselines/reference/consistentUnionSubtypeReduction.symbols b/tests/baselines/reference/consistentUnionSubtypeReduction.symbols new file mode 100644 index 00000000000..44333b25cf6 --- /dev/null +++ b/tests/baselines/reference/consistentUnionSubtypeReduction.symbols @@ -0,0 +1,130 @@ +=== tests/cases/compiler/consistentUnionSubtypeReduction.ts === +// https://github.com/microsoft/TypeScript/issues/31155 + +declare const MyArray: { +>MyArray : Symbol(MyArray, Decl(consistentUnionSubtypeReduction.ts, 2, 13)) + + isArray(arg: T | {}): arg is T extends readonly any[] ? (unknown extends T ? never : readonly any[]) : any[]; +>isArray : Symbol(isArray, Decl(consistentUnionSubtypeReduction.ts, 2, 24)) +>T : Symbol(T, Decl(consistentUnionSubtypeReduction.ts, 3, 12)) +>arg : Symbol(arg, Decl(consistentUnionSubtypeReduction.ts, 3, 15)) +>T : Symbol(T, Decl(consistentUnionSubtypeReduction.ts, 3, 12)) +>arg : Symbol(arg, Decl(consistentUnionSubtypeReduction.ts, 3, 15)) +>T : Symbol(T, Decl(consistentUnionSubtypeReduction.ts, 3, 12)) +>T : Symbol(T, Decl(consistentUnionSubtypeReduction.ts, 3, 12)) + +}; + +declare const a: readonly string[] | string; +>a : Symbol(a, Decl(consistentUnionSubtypeReduction.ts, 6, 13)) + +declare const b: string[] | string; +>b : Symbol(b, Decl(consistentUnionSubtypeReduction.ts, 7, 13)) + +declare const c: unknown; +>c : Symbol(c, Decl(consistentUnionSubtypeReduction.ts, 8, 13)) + +if (MyArray.isArray(a)) { +>MyArray.isArray : Symbol(isArray, Decl(consistentUnionSubtypeReduction.ts, 2, 24)) +>MyArray : Symbol(MyArray, Decl(consistentUnionSubtypeReduction.ts, 2, 13)) +>isArray : Symbol(isArray, Decl(consistentUnionSubtypeReduction.ts, 2, 24)) +>a : Symbol(a, Decl(consistentUnionSubtypeReduction.ts, 6, 13)) + + a; // readonly string[] +>a : Symbol(a, Decl(consistentUnionSubtypeReduction.ts, 6, 13)) +} +else { + a; // string +>a : Symbol(a, Decl(consistentUnionSubtypeReduction.ts, 6, 13)) +} +a; // readonly string[] | string; +>a : Symbol(a, Decl(consistentUnionSubtypeReduction.ts, 6, 13)) + +if (MyArray.isArray(b)) { +>MyArray.isArray : Symbol(isArray, Decl(consistentUnionSubtypeReduction.ts, 2, 24)) +>MyArray : Symbol(MyArray, Decl(consistentUnionSubtypeReduction.ts, 2, 13)) +>isArray : Symbol(isArray, Decl(consistentUnionSubtypeReduction.ts, 2, 24)) +>b : Symbol(b, Decl(consistentUnionSubtypeReduction.ts, 7, 13)) + + b; // string[] | string; +>b : Symbol(b, Decl(consistentUnionSubtypeReduction.ts, 7, 13)) +} +else { + b; // string +>b : Symbol(b, Decl(consistentUnionSubtypeReduction.ts, 7, 13)) +} +b; // string[] | string; +>b : Symbol(b, Decl(consistentUnionSubtypeReduction.ts, 7, 13)) + +if (MyArray.isArray(c)) { +>MyArray.isArray : Symbol(isArray, Decl(consistentUnionSubtypeReduction.ts, 2, 24)) +>MyArray : Symbol(MyArray, Decl(consistentUnionSubtypeReduction.ts, 2, 13)) +>isArray : Symbol(isArray, Decl(consistentUnionSubtypeReduction.ts, 2, 24)) +>c : Symbol(c, Decl(consistentUnionSubtypeReduction.ts, 8, 13)) + + c; // any[] +>c : Symbol(c, Decl(consistentUnionSubtypeReduction.ts, 8, 13)) +} + + +function f(x: T) { +>f : Symbol(f, Decl(consistentUnionSubtypeReduction.ts, 28, 1)) +>T : Symbol(T, Decl(consistentUnionSubtypeReduction.ts, 31, 11)) +>x : Symbol(x, Decl(consistentUnionSubtypeReduction.ts, 31, 14)) +>T : Symbol(T, Decl(consistentUnionSubtypeReduction.ts, 31, 11)) + + const a: readonly T[] | string = null!; +>a : Symbol(a, Decl(consistentUnionSubtypeReduction.ts, 32, 9)) +>T : Symbol(T, Decl(consistentUnionSubtypeReduction.ts, 31, 11)) + + const b: T[] | string = null!; +>b : Symbol(b, Decl(consistentUnionSubtypeReduction.ts, 33, 9)) +>T : Symbol(T, Decl(consistentUnionSubtypeReduction.ts, 31, 11)) + + const c: T = null!; +>c : Symbol(c, Decl(consistentUnionSubtypeReduction.ts, 34, 9)) +>T : Symbol(T, Decl(consistentUnionSubtypeReduction.ts, 31, 11)) + + if (MyArray.isArray(a)) { +>MyArray.isArray : Symbol(isArray, Decl(consistentUnionSubtypeReduction.ts, 2, 24)) +>MyArray : Symbol(MyArray, Decl(consistentUnionSubtypeReduction.ts, 2, 13)) +>isArray : Symbol(isArray, Decl(consistentUnionSubtypeReduction.ts, 2, 24)) +>a : Symbol(a, Decl(consistentUnionSubtypeReduction.ts, 32, 9)) + + a; // readonly T[] +>a : Symbol(a, Decl(consistentUnionSubtypeReduction.ts, 32, 9)) + } + else { + a; // string +>a : Symbol(a, Decl(consistentUnionSubtypeReduction.ts, 32, 9)) + } + a; // readonly T[] | string; +>a : Symbol(a, Decl(consistentUnionSubtypeReduction.ts, 32, 9)) + + if (MyArray.isArray(b)) { +>MyArray.isArray : Symbol(isArray, Decl(consistentUnionSubtypeReduction.ts, 2, 24)) +>MyArray : Symbol(MyArray, Decl(consistentUnionSubtypeReduction.ts, 2, 13)) +>isArray : Symbol(isArray, Decl(consistentUnionSubtypeReduction.ts, 2, 24)) +>b : Symbol(b, Decl(consistentUnionSubtypeReduction.ts, 33, 9)) + + b; // T[] +>b : Symbol(b, Decl(consistentUnionSubtypeReduction.ts, 33, 9)) + } + else { + b; // string +>b : Symbol(b, Decl(consistentUnionSubtypeReduction.ts, 33, 9)) + } + b; +>b : Symbol(b, Decl(consistentUnionSubtypeReduction.ts, 33, 9)) + + if (MyArray.isArray(c)) { +>MyArray.isArray : Symbol(isArray, Decl(consistentUnionSubtypeReduction.ts, 2, 24)) +>MyArray : Symbol(MyArray, Decl(consistentUnionSubtypeReduction.ts, 2, 13)) +>isArray : Symbol(isArray, Decl(consistentUnionSubtypeReduction.ts, 2, 24)) +>c : Symbol(c, Decl(consistentUnionSubtypeReduction.ts, 34, 9)) + + c; // T & (T extends readonly any[] ? readonly any[] : any[]) +>c : Symbol(c, Decl(consistentUnionSubtypeReduction.ts, 34, 9)) + } +} + diff --git a/tests/baselines/reference/consistentUnionSubtypeReduction.types b/tests/baselines/reference/consistentUnionSubtypeReduction.types new file mode 100644 index 00000000000..059fb51b16c --- /dev/null +++ b/tests/baselines/reference/consistentUnionSubtypeReduction.types @@ -0,0 +1,132 @@ +=== tests/cases/compiler/consistentUnionSubtypeReduction.ts === +// https://github.com/microsoft/TypeScript/issues/31155 + +declare const MyArray: { +>MyArray : { isArray(arg: {} | T): arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[]; } + + isArray(arg: T | {}): arg is T extends readonly any[] ? (unknown extends T ? never : readonly any[]) : any[]; +>isArray : (arg: T | {}) => arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[] +>arg : {} | T + +}; + +declare const a: readonly string[] | string; +>a : string | readonly string[] + +declare const b: string[] | string; +>b : string | string[] + +declare const c: unknown; +>c : unknown + +if (MyArray.isArray(a)) { +>MyArray.isArray(a) : boolean +>MyArray.isArray : (arg: {} | T) => arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[] +>MyArray : { isArray(arg: {} | T): arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[]; } +>isArray : (arg: {} | T) => arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[] +>a : string | readonly string[] + + a; // readonly string[] +>a : readonly string[] +} +else { + a; // string +>a : string +} +a; // readonly string[] | string; +>a : string | readonly string[] + +if (MyArray.isArray(b)) { +>MyArray.isArray(b) : boolean +>MyArray.isArray : (arg: {} | T) => arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[] +>MyArray : { isArray(arg: {} | T): arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[]; } +>isArray : (arg: {} | T) => arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[] +>b : string | string[] + + b; // string[] | string; +>b : string[] +} +else { + b; // string +>b : string +} +b; // string[] | string; +>b : string | string[] + +if (MyArray.isArray(c)) { +>MyArray.isArray(c) : boolean +>MyArray.isArray : (arg: {} | T) => arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[] +>MyArray : { isArray(arg: {} | T): arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[]; } +>isArray : (arg: {} | T) => arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[] +>c : unknown + + c; // any[] +>c : any[] +} + + +function f(x: T) { +>f : (x: T) => void +>x : T + + const a: readonly T[] | string = null!; +>a : string | readonly T[] +>null! : null +>null : null + + const b: T[] | string = null!; +>b : string | T[] +>null! : null +>null : null + + const c: T = null!; +>c : T +>null! : null +>null : null + + if (MyArray.isArray(a)) { +>MyArray.isArray(a) : boolean +>MyArray.isArray : (arg: {} | T) => arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[] +>MyArray : { isArray(arg: {} | T): arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[]; } +>isArray : (arg: {} | T) => arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[] +>a : string | readonly T[] + + a; // readonly T[] +>a : readonly T[] + } + else { + a; // string +>a : string + } + a; // readonly T[] | string; +>a : string | readonly T[] + + if (MyArray.isArray(b)) { +>MyArray.isArray(b) : boolean +>MyArray.isArray : (arg: {} | T) => arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[] +>MyArray : { isArray(arg: {} | T): arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[]; } +>isArray : (arg: {} | T) => arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[] +>b : string | T[] + + b; // T[] +>b : T[] + } + else { + b; // string +>b : string + } + b; +>b : string | T[] + + if (MyArray.isArray(c)) { +>MyArray.isArray(c) : boolean +>MyArray.isArray : (arg: {} | T) => arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[] +>MyArray : { isArray(arg: {} | T): arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[]; } +>isArray : (arg: {} | T) => arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[] +>c : T + + c; // T & (T extends readonly any[] ? readonly any[] : any[]) +>c : T & (T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[]) + } +} + diff --git a/tests/baselines/reference/constAssertions.errors.txt b/tests/baselines/reference/constAssertions.errors.txt index 8ecce1377e3..ef237f5017c 100644 --- a/tests/baselines/reference/constAssertions.errors.txt +++ b/tests/baselines/reference/constAssertions.errors.txt @@ -76,4 +76,48 @@ tests/cases/conformance/expressions/typeAssertions/constAssertions.ts(63,10): er let e3 = id(1) as const; // Error ~~~~~ !!! error TS1355: A 'const' assertions can only be applied to references to enum members, or string, number, boolean, array, or object literals. - \ No newline at end of file + + let t1 = 'foo' as const; + let t2 = 'bar' as const; + let t3 = `${t1}-${t2}` as const; + let t4 = `${`(${t1})`}-${`(${t2})`}` as const; + + function ff1(x: 'foo' | 'bar', y: 1 | 2) { + return `${x}-${y}` as const; + } + + function ff2(x: T, y: U) { + return `${x}-${y}` as const; + } + + const ts1 = ff2('foo', 'bar'); + const ts2 = ff2('foo', !!true ? '0' : '1'); + const ts3 = ff2(!!true ? 'top' : 'bottom', !!true ? 'left' : 'right'); + + function ff3(x: 'foo' | 'bar', y: object) { + return `${x}${y}` as const; + } + + type Action = "verify" | "write"; + type ContentMatch = "match" | "nonMatch"; + type Outcome = `${Action}_${ContentMatch}`; + + function ff4(verify: boolean, contentMatches: boolean) { + const action : Action = verify ? `verify` : `write`; + const contentMatch: ContentMatch = contentMatches ? `match` : `nonMatch`; + const outcome: Outcome = `${action}_${contentMatch}` as const; + return outcome; + } + + function ff5(verify: boolean, contentMatches: boolean) { + const action = verify ? `verify` : `write`; + const contentMatch = contentMatches ? `match` : `nonMatch`; + const outcome = `${action}_${contentMatch}` as const; + return outcome; + } + + function accessorNames(propName: S) { + return [`get-${propName}`, `set-${propName}`] as const; + } + + const ns1 = accessorNames('foo'); \ No newline at end of file diff --git a/tests/baselines/reference/constAssertions.js b/tests/baselines/reference/constAssertions.js index 1dc997a2c58..5e3b2b8b187 100644 --- a/tests/baselines/reference/constAssertions.js +++ b/tests/baselines/reference/constAssertions.js @@ -62,7 +62,51 @@ declare function id(x: T): T; let e1 = v1 as const; // Error let e2 = (true ? 1 : 0) as const; // Error let e3 = id(1) as const; // Error - + +let t1 = 'foo' as const; +let t2 = 'bar' as const; +let t3 = `${t1}-${t2}` as const; +let t4 = `${`(${t1})`}-${`(${t2})`}` as const; + +function ff1(x: 'foo' | 'bar', y: 1 | 2) { + return `${x}-${y}` as const; +} + +function ff2(x: T, y: U) { + return `${x}-${y}` as const; +} + +const ts1 = ff2('foo', 'bar'); +const ts2 = ff2('foo', !!true ? '0' : '1'); +const ts3 = ff2(!!true ? 'top' : 'bottom', !!true ? 'left' : 'right'); + +function ff3(x: 'foo' | 'bar', y: object) { + return `${x}${y}` as const; +} + +type Action = "verify" | "write"; +type ContentMatch = "match" | "nonMatch"; +type Outcome = `${Action}_${ContentMatch}`; + +function ff4(verify: boolean, contentMatches: boolean) { + const action : Action = verify ? `verify` : `write`; + const contentMatch: ContentMatch = contentMatches ? `match` : `nonMatch`; + const outcome: Outcome = `${action}_${contentMatch}` as const; + return outcome; +} + +function ff5(verify: boolean, contentMatches: boolean) { + const action = verify ? `verify` : `write`; + const contentMatch = contentMatches ? `match` : `nonMatch`; + const outcome = `${action}_${contentMatch}` as const; + return outcome; +} + +function accessorNames(propName: S) { + return [`get-${propName}`, `set-${propName}`] as const; +} + +const ns1 = accessorNames('foo'); //// [constAssertions.js] "use strict"; @@ -117,6 +161,38 @@ let q5 = { x: 10, y: 20 }; let e1 = v1; // Error let e2 = (true ? 1 : 0); // Error let e3 = id(1); // Error +let t1 = 'foo'; +let t2 = 'bar'; +let t3 = `${t1}-${t2}`; +let t4 = `${`(${t1})`}-${`(${t2})`}`; +function ff1(x, y) { + return `${x}-${y}`; +} +function ff2(x, y) { + return `${x}-${y}`; +} +const ts1 = ff2('foo', 'bar'); +const ts2 = ff2('foo', !!true ? '0' : '1'); +const ts3 = ff2(!!true ? 'top' : 'bottom', !!true ? 'left' : 'right'); +function ff3(x, y) { + return `${x}${y}`; +} +function ff4(verify, contentMatches) { + const action = verify ? `verify` : `write`; + const contentMatch = contentMatches ? `match` : `nonMatch`; + const outcome = `${action}_${contentMatch}`; + return outcome; +} +function ff5(verify, contentMatches) { + const action = verify ? `verify` : `write`; + const contentMatch = contentMatches ? `match` : `nonMatch`; + const outcome = `${action}_${contentMatch}`; + return outcome; +} +function accessorNames(propName) { + return [`get-${propName}`, `set-${propName}`]; +} +const ns1 = accessorNames('foo'); //// [constAssertions.d.ts] @@ -218,3 +294,20 @@ declare function id(x: T): T; declare let e1: "abc"; declare let e2: 0 | 1; declare let e3: 1; +declare let t1: "foo"; +declare let t2: "bar"; +declare let t3: "foo-bar"; +declare let t4: "(foo)-(bar)"; +declare function ff1(x: 'foo' | 'bar', y: 1 | 2): "foo-1" | "foo-2" | "bar-1" | "bar-2"; +declare function ff2(x: T, y: U): `${T}-${U}`; +declare const ts1: "foo-bar"; +declare const ts2: "foo-1" | "foo-0"; +declare const ts3: "top-left" | "top-right" | "bottom-left" | "bottom-right"; +declare function ff3(x: 'foo' | 'bar', y: object): `foo${string}` | `bar${string}`; +declare type Action = "verify" | "write"; +declare type ContentMatch = "match" | "nonMatch"; +declare type Outcome = `${Action}_${ContentMatch}`; +declare function ff4(verify: boolean, contentMatches: boolean): "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch"; +declare function ff5(verify: boolean, contentMatches: boolean): "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch"; +declare function accessorNames(propName: S): readonly [`get-${S}`, `set-${S}`]; +declare const ns1: readonly ["get-foo", "set-foo"]; diff --git a/tests/baselines/reference/constAssertions.symbols b/tests/baselines/reference/constAssertions.symbols index 598210f42b3..6e81b68fa87 100644 --- a/tests/baselines/reference/constAssertions.symbols +++ b/tests/baselines/reference/constAssertions.symbols @@ -199,3 +199,138 @@ let e3 = id(1) as const; // Error >e3 : Symbol(e3, Decl(constAssertions.ts, 62, 3)) >id : Symbol(id, Decl(constAssertions.ts, 56, 34)) +let t1 = 'foo' as const; +>t1 : Symbol(t1, Decl(constAssertions.ts, 64, 3)) + +let t2 = 'bar' as const; +>t2 : Symbol(t2, Decl(constAssertions.ts, 65, 3)) + +let t3 = `${t1}-${t2}` as const; +>t3 : Symbol(t3, Decl(constAssertions.ts, 66, 3)) +>t1 : Symbol(t1, Decl(constAssertions.ts, 64, 3)) +>t2 : Symbol(t2, Decl(constAssertions.ts, 65, 3)) + +let t4 = `${`(${t1})`}-${`(${t2})`}` as const; +>t4 : Symbol(t4, Decl(constAssertions.ts, 67, 3)) +>t1 : Symbol(t1, Decl(constAssertions.ts, 64, 3)) +>t2 : Symbol(t2, Decl(constAssertions.ts, 65, 3)) + +function ff1(x: 'foo' | 'bar', y: 1 | 2) { +>ff1 : Symbol(ff1, Decl(constAssertions.ts, 67, 46)) +>x : Symbol(x, Decl(constAssertions.ts, 69, 13)) +>y : Symbol(y, Decl(constAssertions.ts, 69, 30)) + + return `${x}-${y}` as const; +>x : Symbol(x, Decl(constAssertions.ts, 69, 13)) +>y : Symbol(y, Decl(constAssertions.ts, 69, 30)) +} + +function ff2(x: T, y: U) { +>ff2 : Symbol(ff2, Decl(constAssertions.ts, 71, 1)) +>T : Symbol(T, Decl(constAssertions.ts, 73, 13)) +>U : Symbol(U, Decl(constAssertions.ts, 73, 30)) +>x : Symbol(x, Decl(constAssertions.ts, 73, 49)) +>T : Symbol(T, Decl(constAssertions.ts, 73, 13)) +>y : Symbol(y, Decl(constAssertions.ts, 73, 54)) +>U : Symbol(U, Decl(constAssertions.ts, 73, 30)) + + return `${x}-${y}` as const; +>x : Symbol(x, Decl(constAssertions.ts, 73, 49)) +>y : Symbol(y, Decl(constAssertions.ts, 73, 54)) +} + +const ts1 = ff2('foo', 'bar'); +>ts1 : Symbol(ts1, Decl(constAssertions.ts, 77, 5)) +>ff2 : Symbol(ff2, Decl(constAssertions.ts, 71, 1)) + +const ts2 = ff2('foo', !!true ? '0' : '1'); +>ts2 : Symbol(ts2, Decl(constAssertions.ts, 78, 5)) +>ff2 : Symbol(ff2, Decl(constAssertions.ts, 71, 1)) + +const ts3 = ff2(!!true ? 'top' : 'bottom', !!true ? 'left' : 'right'); +>ts3 : Symbol(ts3, Decl(constAssertions.ts, 79, 5)) +>ff2 : Symbol(ff2, Decl(constAssertions.ts, 71, 1)) + +function ff3(x: 'foo' | 'bar', y: object) { +>ff3 : Symbol(ff3, Decl(constAssertions.ts, 79, 70)) +>x : Symbol(x, Decl(constAssertions.ts, 81, 13)) +>y : Symbol(y, Decl(constAssertions.ts, 81, 30)) + + return `${x}${y}` as const; +>x : Symbol(x, Decl(constAssertions.ts, 81, 13)) +>y : Symbol(y, Decl(constAssertions.ts, 81, 30)) +} + +type Action = "verify" | "write"; +>Action : Symbol(Action, Decl(constAssertions.ts, 83, 1)) + +type ContentMatch = "match" | "nonMatch"; +>ContentMatch : Symbol(ContentMatch, Decl(constAssertions.ts, 85, 33)) + +type Outcome = `${Action}_${ContentMatch}`; +>Outcome : Symbol(Outcome, Decl(constAssertions.ts, 86, 41)) +>Action : Symbol(Action, Decl(constAssertions.ts, 83, 1)) +>ContentMatch : Symbol(ContentMatch, Decl(constAssertions.ts, 85, 33)) + +function ff4(verify: boolean, contentMatches: boolean) { +>ff4 : Symbol(ff4, Decl(constAssertions.ts, 87, 43)) +>verify : Symbol(verify, Decl(constAssertions.ts, 89, 13)) +>contentMatches : Symbol(contentMatches, Decl(constAssertions.ts, 89, 29)) + + const action : Action = verify ? `verify` : `write`; +>action : Symbol(action, Decl(constAssertions.ts, 90, 9)) +>Action : Symbol(Action, Decl(constAssertions.ts, 83, 1)) +>verify : Symbol(verify, Decl(constAssertions.ts, 89, 13)) + + const contentMatch: ContentMatch = contentMatches ? `match` : `nonMatch`; +>contentMatch : Symbol(contentMatch, Decl(constAssertions.ts, 91, 9)) +>ContentMatch : Symbol(ContentMatch, Decl(constAssertions.ts, 85, 33)) +>contentMatches : Symbol(contentMatches, Decl(constAssertions.ts, 89, 29)) + + const outcome: Outcome = `${action}_${contentMatch}` as const; +>outcome : Symbol(outcome, Decl(constAssertions.ts, 92, 9)) +>Outcome : Symbol(Outcome, Decl(constAssertions.ts, 86, 41)) +>action : Symbol(action, Decl(constAssertions.ts, 90, 9)) +>contentMatch : Symbol(contentMatch, Decl(constAssertions.ts, 91, 9)) + + return outcome; +>outcome : Symbol(outcome, Decl(constAssertions.ts, 92, 9)) +} + +function ff5(verify: boolean, contentMatches: boolean) { +>ff5 : Symbol(ff5, Decl(constAssertions.ts, 94, 1)) +>verify : Symbol(verify, Decl(constAssertions.ts, 96, 13)) +>contentMatches : Symbol(contentMatches, Decl(constAssertions.ts, 96, 29)) + + const action = verify ? `verify` : `write`; +>action : Symbol(action, Decl(constAssertions.ts, 97, 9)) +>verify : Symbol(verify, Decl(constAssertions.ts, 96, 13)) + + const contentMatch = contentMatches ? `match` : `nonMatch`; +>contentMatch : Symbol(contentMatch, Decl(constAssertions.ts, 98, 9)) +>contentMatches : Symbol(contentMatches, Decl(constAssertions.ts, 96, 29)) + + const outcome = `${action}_${contentMatch}` as const; +>outcome : Symbol(outcome, Decl(constAssertions.ts, 99, 9)) +>action : Symbol(action, Decl(constAssertions.ts, 97, 9)) +>contentMatch : Symbol(contentMatch, Decl(constAssertions.ts, 98, 9)) + + return outcome; +>outcome : Symbol(outcome, Decl(constAssertions.ts, 99, 9)) +} + +function accessorNames(propName: S) { +>accessorNames : Symbol(accessorNames, Decl(constAssertions.ts, 101, 1)) +>S : Symbol(S, Decl(constAssertions.ts, 103, 23)) +>propName : Symbol(propName, Decl(constAssertions.ts, 103, 41)) +>S : Symbol(S, Decl(constAssertions.ts, 103, 23)) + + return [`get-${propName}`, `set-${propName}`] as const; +>propName : Symbol(propName, Decl(constAssertions.ts, 103, 41)) +>propName : Symbol(propName, Decl(constAssertions.ts, 103, 41)) +} + +const ns1 = accessorNames('foo'); +>ns1 : Symbol(ns1, Decl(constAssertions.ts, 107, 5)) +>accessorNames : Symbol(accessorNames, Decl(constAssertions.ts, 101, 1)) + diff --git a/tests/baselines/reference/constAssertions.types b/tests/baselines/reference/constAssertions.types index 68b442e0c44..15206af8c0e 100644 --- a/tests/baselines/reference/constAssertions.types +++ b/tests/baselines/reference/constAssertions.types @@ -354,3 +354,189 @@ let e3 = id(1) as const; // Error >id : (x: T) => T >1 : 1 +let t1 = 'foo' as const; +>t1 : "foo" +>'foo' as const : "foo" +>'foo' : "foo" + +let t2 = 'bar' as const; +>t2 : "bar" +>'bar' as const : "bar" +>'bar' : "bar" + +let t3 = `${t1}-${t2}` as const; +>t3 : "foo-bar" +>`${t1}-${t2}` as const : "foo-bar" +>`${t1}-${t2}` : "foo-bar" +>t1 : "foo" +>t2 : "bar" + +let t4 = `${`(${t1})`}-${`(${t2})`}` as const; +>t4 : "(foo)-(bar)" +>`${`(${t1})`}-${`(${t2})`}` as const : "(foo)-(bar)" +>`${`(${t1})`}-${`(${t2})`}` : "(foo)-(bar)" +>`(${t1})` : "(foo)" +>t1 : "foo" +>`(${t2})` : "(bar)" +>t2 : "bar" + +function ff1(x: 'foo' | 'bar', y: 1 | 2) { +>ff1 : (x: 'foo' | 'bar', y: 1 | 2) => "foo-1" | "foo-2" | "bar-1" | "bar-2" +>x : "foo" | "bar" +>y : 1 | 2 + + return `${x}-${y}` as const; +>`${x}-${y}` as const : "foo-1" | "foo-2" | "bar-1" | "bar-2" +>`${x}-${y}` : "foo-1" | "foo-2" | "bar-1" | "bar-2" +>x : "foo" | "bar" +>y : 1 | 2 +} + +function ff2(x: T, y: U) { +>ff2 : (x: T, y: U) => `${T}-${U}` +>x : T +>y : U + + return `${x}-${y}` as const; +>`${x}-${y}` as const : `${T}-${U}` +>`${x}-${y}` : `${T}-${U}` +>x : T +>y : U +} + +const ts1 = ff2('foo', 'bar'); +>ts1 : "foo-bar" +>ff2('foo', 'bar') : "foo-bar" +>ff2 : (x: T, y: U) => `${T}-${U}` +>'foo' : "foo" +>'bar' : "bar" + +const ts2 = ff2('foo', !!true ? '0' : '1'); +>ts2 : "foo-1" | "foo-0" +>ff2('foo', !!true ? '0' : '1') : "foo-1" | "foo-0" +>ff2 : (x: T, y: U) => `${T}-${U}` +>'foo' : "foo" +>!!true ? '0' : '1' : "0" | "1" +>!!true : true +>!true : false +>true : true +>'0' : "0" +>'1' : "1" + +const ts3 = ff2(!!true ? 'top' : 'bottom', !!true ? 'left' : 'right'); +>ts3 : "top-left" | "top-right" | "bottom-left" | "bottom-right" +>ff2(!!true ? 'top' : 'bottom', !!true ? 'left' : 'right') : "top-left" | "top-right" | "bottom-left" | "bottom-right" +>ff2 : (x: T, y: U) => `${T}-${U}` +>!!true ? 'top' : 'bottom' : "top" | "bottom" +>!!true : true +>!true : false +>true : true +>'top' : "top" +>'bottom' : "bottom" +>!!true ? 'left' : 'right' : "left" | "right" +>!!true : true +>!true : false +>true : true +>'left' : "left" +>'right' : "right" + +function ff3(x: 'foo' | 'bar', y: object) { +>ff3 : (x: 'foo' | 'bar', y: object) => `foo${string}` | `bar${string}` +>x : "foo" | "bar" +>y : object + + return `${x}${y}` as const; +>`${x}${y}` as const : `foo${string}` | `bar${string}` +>`${x}${y}` : `foo${string}` | `bar${string}` +>x : "foo" | "bar" +>y : object +} + +type Action = "verify" | "write"; +>Action : Action + +type ContentMatch = "match" | "nonMatch"; +>ContentMatch : ContentMatch + +type Outcome = `${Action}_${ContentMatch}`; +>Outcome : "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch" + +function ff4(verify: boolean, contentMatches: boolean) { +>ff4 : (verify: boolean, contentMatches: boolean) => "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch" +>verify : boolean +>contentMatches : boolean + + const action : Action = verify ? `verify` : `write`; +>action : Action +>verify ? `verify` : `write` : Action +>verify : boolean +>`verify` : "verify" +>`write` : "write" + + const contentMatch: ContentMatch = contentMatches ? `match` : `nonMatch`; +>contentMatch : ContentMatch +>contentMatches ? `match` : `nonMatch` : ContentMatch +>contentMatches : boolean +>`match` : "match" +>`nonMatch` : "nonMatch" + + const outcome: Outcome = `${action}_${contentMatch}` as const; +>outcome : "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch" +>`${action}_${contentMatch}` as const : "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch" +>`${action}_${contentMatch}` : "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch" +>action : Action +>contentMatch : ContentMatch + + return outcome; +>outcome : "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch" +} + +function ff5(verify: boolean, contentMatches: boolean) { +>ff5 : (verify: boolean, contentMatches: boolean) => "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch" +>verify : boolean +>contentMatches : boolean + + const action = verify ? `verify` : `write`; +>action : "verify" | "write" +>verify ? `verify` : `write` : Action +>verify : boolean +>`verify` : "verify" +>`write` : "write" + + const contentMatch = contentMatches ? `match` : `nonMatch`; +>contentMatch : "match" | "nonMatch" +>contentMatches ? `match` : `nonMatch` : ContentMatch +>contentMatches : boolean +>`match` : "match" +>`nonMatch` : "nonMatch" + + const outcome = `${action}_${contentMatch}` as const; +>outcome : "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch" +>`${action}_${contentMatch}` as const : "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch" +>`${action}_${contentMatch}` : "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch" +>action : Action +>contentMatch : ContentMatch + + return outcome; +>outcome : "verify_match" | "verify_nonMatch" | "write_match" | "write_nonMatch" +} + +function accessorNames(propName: S) { +>accessorNames : (propName: S) => readonly [`get-${S}`, `set-${S}`] +>propName : S + + return [`get-${propName}`, `set-${propName}`] as const; +>[`get-${propName}`, `set-${propName}`] as const : readonly [`get-${S}`, `set-${S}`] +>[`get-${propName}`, `set-${propName}`] : readonly [`get-${S}`, `set-${S}`] +>`get-${propName}` : `get-${S}` +>propName : S +>`set-${propName}` : `set-${S}` +>propName : S +} + +const ns1 = accessorNames('foo'); +>ns1 : readonly ["get-foo", "set-foo"] +>accessorNames('foo') : readonly ["get-foo", "set-foo"] +>accessorNames : (propName: S) => readonly [`get-${S}`, `set-${S}`] +>'foo' : "foo" + diff --git a/tests/baselines/reference/constructorFunctions2.types b/tests/baselines/reference/constructorFunctions2.types index 0f5933e04f4..8b1f3711770 100644 --- a/tests/baselines/reference/constructorFunctions2.types +++ b/tests/baselines/reference/constructorFunctions2.types @@ -9,16 +9,16 @@ declare var module: any, exports: any; === tests/cases/conformance/salsa/index.js === const A = require("./other"); ->A : typeof import("tests/cases/conformance/salsa/other") ->require("./other") : typeof import("tests/cases/conformance/salsa/other") +>A : typeof A +>require("./other") : typeof A >require : (id: string) => any >"./other" : "./other" const a = new A().id; >a : number >new A().id : number ->new A() : import("tests/cases/conformance/salsa/other") ->A : typeof import("tests/cases/conformance/salsa/other") +>new A() : A +>A : typeof A >id : number const B = function() { this.id = 1; } diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt index 090d249f923..c8af0683007 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2503: Cannot find namespace 'module'. -tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`. +tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(11,19): error TS1005: ';' expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(22,35): error TS1005: ')' expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(22,39): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number', 'bigint' or an enum type. @@ -105,7 +105,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS ~~~~~~ !!! error TS2503: Cannot find namespace 'module'. ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`. +!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. ~ !!! error TS1005: ';' expected. diff --git a/tests/baselines/reference/contextualExpressionTypecheckingDoesntBlowStack.types b/tests/baselines/reference/contextualExpressionTypecheckingDoesntBlowStack.types index 3e690f0844b..549783e0d36 100644 --- a/tests/baselines/reference/contextualExpressionTypecheckingDoesntBlowStack.types +++ b/tests/baselines/reference/contextualExpressionTypecheckingDoesntBlowStack.types @@ -59,7 +59,7 @@ export default class Operation { >name : any if(innerResult && innerResult.length > 0) { ->innerResult && innerResult.length > 0 : boolean +>innerResult && innerResult.length > 0 : any >innerResult : any >innerResult.length > 0 : boolean >innerResult.length : any diff --git a/tests/baselines/reference/contextualTypeIterableUnions.js b/tests/baselines/reference/contextualTypeIterableUnions.js new file mode 100644 index 00000000000..d1bb4e9d8a8 --- /dev/null +++ b/tests/baselines/reference/contextualTypeIterableUnions.js @@ -0,0 +1,17 @@ +//// [contextualTypeIterableUnions.ts] +declare class DMap { + constructor(iterable: Iterable<[K, V]> | undefined); +} +new DMap([["1", 2]]); + +const i1: Iterable<{ a: true }> | undefined = [{ a: true }]; +const i2: Iterable<{ a: true }> | Iterable<{ b: false }> = [{ b: false }]; +const i3: Iterable | 1[] = [2]; + + +//// [contextualTypeIterableUnions.js] +"use strict"; +new DMap([["1", 2]]); +const i1 = [{ a: true }]; +const i2 = [{ b: false }]; +const i3 = [2]; diff --git a/tests/baselines/reference/contextualTypeIterableUnions.symbols b/tests/baselines/reference/contextualTypeIterableUnions.symbols new file mode 100644 index 00000000000..0ae7379596e --- /dev/null +++ b/tests/baselines/reference/contextualTypeIterableUnions.symbols @@ -0,0 +1,33 @@ +=== tests/cases/compiler/contextualTypeIterableUnions.ts === +declare class DMap { +>DMap : Symbol(DMap, Decl(contextualTypeIterableUnions.ts, 0, 0)) +>K : Symbol(K, Decl(contextualTypeIterableUnions.ts, 0, 19)) +>V : Symbol(V, Decl(contextualTypeIterableUnions.ts, 0, 21)) + + constructor(iterable: Iterable<[K, V]> | undefined); +>iterable : Symbol(iterable, Decl(contextualTypeIterableUnions.ts, 1, 14)) +>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) +>K : Symbol(K, Decl(contextualTypeIterableUnions.ts, 0, 19)) +>V : Symbol(V, Decl(contextualTypeIterableUnions.ts, 0, 21)) +} +new DMap([["1", 2]]); +>DMap : Symbol(DMap, Decl(contextualTypeIterableUnions.ts, 0, 0)) + +const i1: Iterable<{ a: true }> | undefined = [{ a: true }]; +>i1 : Symbol(i1, Decl(contextualTypeIterableUnions.ts, 5, 5)) +>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) +>a : Symbol(a, Decl(contextualTypeIterableUnions.ts, 5, 20)) +>a : Symbol(a, Decl(contextualTypeIterableUnions.ts, 5, 48)) + +const i2: Iterable<{ a: true }> | Iterable<{ b: false }> = [{ b: false }]; +>i2 : Symbol(i2, Decl(contextualTypeIterableUnions.ts, 6, 5)) +>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) +>a : Symbol(a, Decl(contextualTypeIterableUnions.ts, 6, 20)) +>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) +>b : Symbol(b, Decl(contextualTypeIterableUnions.ts, 6, 44)) +>b : Symbol(b, Decl(contextualTypeIterableUnions.ts, 6, 61)) + +const i3: Iterable | 1[] = [2]; +>i3 : Symbol(i3, Decl(contextualTypeIterableUnions.ts, 7, 5)) +>Iterable : Symbol(Iterable, Decl(lib.es2015.iterable.d.ts, --, --)) + diff --git a/tests/baselines/reference/contextualTypeIterableUnions.types b/tests/baselines/reference/contextualTypeIterableUnions.types new file mode 100644 index 00000000000..455b4d55733 --- /dev/null +++ b/tests/baselines/reference/contextualTypeIterableUnions.types @@ -0,0 +1,40 @@ +=== tests/cases/compiler/contextualTypeIterableUnions.ts === +declare class DMap { +>DMap : DMap + + constructor(iterable: Iterable<[K, V]> | undefined); +>iterable : Iterable<[K, V]> | undefined +} +new DMap([["1", 2]]); +>new DMap([["1", 2]]) : DMap +>DMap : typeof DMap +>[["1", 2]] : [string, number][] +>["1", 2] : [string, number] +>"1" : "1" +>2 : 2 + +const i1: Iterable<{ a: true }> | undefined = [{ a: true }]; +>i1 : Iterable<{ a: true; }> | undefined +>a : true +>true : true +>[{ a: true }] : { a: true; }[] +>{ a: true } : { a: true; } +>a : true +>true : true + +const i2: Iterable<{ a: true }> | Iterable<{ b: false }> = [{ b: false }]; +>i2 : Iterable<{ a: true; }> | Iterable<{ b: false; }> +>a : true +>true : true +>b : false +>false : false +>[{ b: false }] : { b: false; }[] +>{ b: false } : { b: false; } +>b : false +>false : false + +const i3: Iterable | 1[] = [2]; +>i3 : Iterable | 1[] +>[2] : 2[] +>2 : 2 + diff --git a/tests/baselines/reference/contextualTypingArrayDestructuringWithDefaults.errors.txt b/tests/baselines/reference/contextualTypingArrayDestructuringWithDefaults.errors.txt new file mode 100644 index 00000000000..fa9e85056a4 --- /dev/null +++ b/tests/baselines/reference/contextualTypingArrayDestructuringWithDefaults.errors.txt @@ -0,0 +1,17 @@ +tests/cases/compiler/contextualTypingArrayDestructuringWithDefaults.ts(8,10): error TS2322: Type '{ a: number; }' is not assignable to type '1'. + + +==== tests/cases/compiler/contextualTypingArrayDestructuringWithDefaults.ts (1 errors) ==== + type I = { a: "a" }; + let [ c0 = {a: "a"} ]: [I?] = []; + let [ x1, c1 = {a: "a"} ]: [number, I?] = [1]; + let [ c_ = {a: "a"} ]: I[] = []; + + // not a great example, expect an error + function foo() { + let {length = {a: 1}}: [number] = [1]; + ~~~~~~ +!!! error TS2322: Type '{ a: number; }' is not assignable to type '1'. + return length; + } + \ No newline at end of file diff --git a/tests/baselines/reference/contextualTypingArrayDestructuringWithDefaults.js b/tests/baselines/reference/contextualTypingArrayDestructuringWithDefaults.js new file mode 100644 index 00000000000..45e57d23f0e --- /dev/null +++ b/tests/baselines/reference/contextualTypingArrayDestructuringWithDefaults.js @@ -0,0 +1,22 @@ +//// [contextualTypingArrayDestructuringWithDefaults.ts] +type I = { a: "a" }; +let [ c0 = {a: "a"} ]: [I?] = []; +let [ x1, c1 = {a: "a"} ]: [number, I?] = [1]; +let [ c_ = {a: "a"} ]: I[] = []; + +// not a great example, expect an error +function foo() { + let {length = {a: 1}}: [number] = [1]; + return length; +} + + +//// [contextualTypingArrayDestructuringWithDefaults.js] +var _a = [][0], c0 = _a === void 0 ? { a: "a" } : _a; +var _b = [1], x1 = _b[0], _c = _b[1], c1 = _c === void 0 ? { a: "a" } : _c; +var _d = [][0], c_ = _d === void 0 ? { a: "a" } : _d; +// not a great example, expect an error +function foo() { + var _a = [1].length, length = _a === void 0 ? { a: 1 } : _a; + return length; +} diff --git a/tests/baselines/reference/contextualTypingArrayDestructuringWithDefaults.symbols b/tests/baselines/reference/contextualTypingArrayDestructuringWithDefaults.symbols new file mode 100644 index 00000000000..0e6d0a31569 --- /dev/null +++ b/tests/baselines/reference/contextualTypingArrayDestructuringWithDefaults.symbols @@ -0,0 +1,33 @@ +=== tests/cases/compiler/contextualTypingArrayDestructuringWithDefaults.ts === +type I = { a: "a" }; +>I : Symbol(I, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 0, 0)) +>a : Symbol(a, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 0, 10)) + +let [ c0 = {a: "a"} ]: [I?] = []; +>c0 : Symbol(c0, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 1, 5)) +>a : Symbol(a, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 1, 12)) +>I : Symbol(I, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 0, 0)) + +let [ x1, c1 = {a: "a"} ]: [number, I?] = [1]; +>x1 : Symbol(x1, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 2, 5)) +>c1 : Symbol(c1, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 2, 9)) +>a : Symbol(a, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 2, 16)) +>I : Symbol(I, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 0, 0)) + +let [ c_ = {a: "a"} ]: I[] = []; +>c_ : Symbol(c_, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 3, 5)) +>a : Symbol(a, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 3, 12)) +>I : Symbol(I, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 0, 0)) + +// not a great example, expect an error +function foo() { +>foo : Symbol(foo, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 3, 32)) + + let {length = {a: 1}}: [number] = [1]; +>length : Symbol(length, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 7, 9)) +>a : Symbol(a, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 7, 19)) + + return length; +>length : Symbol(length, Decl(contextualTypingArrayDestructuringWithDefaults.ts, 7, 9)) +} + diff --git a/tests/baselines/reference/contextualTypingArrayDestructuringWithDefaults.types b/tests/baselines/reference/contextualTypingArrayDestructuringWithDefaults.types new file mode 100644 index 00000000000..30e35d683db --- /dev/null +++ b/tests/baselines/reference/contextualTypingArrayDestructuringWithDefaults.types @@ -0,0 +1,44 @@ +=== tests/cases/compiler/contextualTypingArrayDestructuringWithDefaults.ts === +type I = { a: "a" }; +>I : I +>a : "a" + +let [ c0 = {a: "a"} ]: [I?] = []; +>c0 : I +>{a: "a"} : { a: "a"; } +>a : "a" +>"a" : "a" +>[] : [] + +let [ x1, c1 = {a: "a"} ]: [number, I?] = [1]; +>x1 : number +>c1 : I +>{a: "a"} : { a: "a"; } +>a : "a" +>"a" : "a" +>[1] : [number] +>1 : 1 + +let [ c_ = {a: "a"} ]: I[] = []; +>c_ : I +>{a: "a"} : { a: "a"; } +>a : "a" +>"a" : "a" +>[] : undefined[] + +// not a great example, expect an error +function foo() { +>foo : () => 1 + + let {length = {a: 1}}: [number] = [1]; +>length : 1 +>{a: 1} : { a: number; } +>a : number +>1 : 1 +>[1] : [number] +>1 : 1 + + return length; +>length : 1 +} + diff --git a/tests/baselines/reference/contextuallyTypeAsyncFunctionAwaitOperand.types b/tests/baselines/reference/contextuallyTypeAsyncFunctionAwaitOperand.types index 377f7c15ae3..97981254e90 100644 --- a/tests/baselines/reference/contextuallyTypeAsyncFunctionAwaitOperand.types +++ b/tests/baselines/reference/contextuallyTypeAsyncFunctionAwaitOperand.types @@ -17,10 +17,10 @@ async function fn1(): Promise { >await new Promise(resolve => resolve({ key: "value" })) : Obj >new Promise(resolve => resolve({ key: "value" })) : Promise >Promise : PromiseConstructor ->resolve => resolve({ key: "value" }) : (resolve: (value?: Obj | PromiseLike) => void) => void ->resolve : (value?: Obj | PromiseLike) => void +>resolve => resolve({ key: "value" }) : (resolve: (value: Obj | PromiseLike) => void) => void +>resolve : (value: Obj | PromiseLike) => void >resolve({ key: "value" }) : void ->resolve : (value?: Obj | PromiseLike) => void +>resolve : (value: Obj | PromiseLike) => void >{ key: "value" } : { key: "value"; } >key : "value" >"value" : "value" diff --git a/tests/baselines/reference/contextuallyTypeAsyncFunctionReturnType.types b/tests/baselines/reference/contextuallyTypeAsyncFunctionReturnType.types index d47a623ffc6..77aa15a8b08 100644 --- a/tests/baselines/reference/contextuallyTypeAsyncFunctionReturnType.types +++ b/tests/baselines/reference/contextuallyTypeAsyncFunctionReturnType.types @@ -17,12 +17,12 @@ async function fn2(): Promise { return new Promise(resolve => { >new Promise(resolve => { resolve({ key: "value" }); }) : Promise >Promise : PromiseConstructor ->resolve => { resolve({ key: "value" }); } : (resolve: (value?: Obj | PromiseLike) => void) => void ->resolve : (value?: Obj | PromiseLike) => void +>resolve => { resolve({ key: "value" }); } : (resolve: (value: Obj | PromiseLike) => void) => void +>resolve : (value: Obj | PromiseLike) => void resolve({ key: "value" }); >resolve({ key: "value" }) : void ->resolve : (value?: Obj | PromiseLike) => void +>resolve : (value: Obj | PromiseLike) => void >{ key: "value" } : { key: "value"; } >key : "value" >"value" : "value" @@ -47,12 +47,12 @@ async function fn4(): Promise { >await new Promise(resolve => { resolve({ key: "value" }); }) : Obj >new Promise(resolve => { resolve({ key: "value" }); }) : Promise >Promise : PromiseConstructor ->resolve => { resolve({ key: "value" }); } : (resolve: (value?: Obj | PromiseLike) => void) => void ->resolve : (value?: Obj | PromiseLike) => void +>resolve => { resolve({ key: "value" }); } : (resolve: (value: Obj | PromiseLike) => void) => void +>resolve : (value: Obj | PromiseLike) => void resolve({ key: "value" }); >resolve({ key: "value" }) : void ->resolve : (value?: Obj | PromiseLike) => void +>resolve : (value: Obj | PromiseLike) => void >{ key: "value" } : { key: "value"; } >key : "value" >"value" : "value" diff --git a/tests/baselines/reference/contextuallyTypedClassExpressionMethodDeclaration01.errors.txt b/tests/baselines/reference/contextuallyTypedClassExpressionMethodDeclaration01.errors.txt index 1fef4e61268..a99654c41f7 100644 --- a/tests/baselines/reference/contextuallyTypedClassExpressionMethodDeclaration01.errors.txt +++ b/tests/baselines/reference/contextuallyTypedClassExpressionMethodDeclaration01.errors.txt @@ -1,12 +1,8 @@ tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration01.ts(16,24): error TS7006: Parameter 'arg' implicitly has an 'any' type. tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration01.ts(19,24): error TS7006: Parameter 'arg' implicitly has an 'any' type. -tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration01.ts(27,27): error TS7006: Parameter 'arg' implicitly has an 'any' type. -tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration01.ts(30,27): error TS7006: Parameter 'arg' implicitly has an 'any' type. -tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration01.ts(38,36): error TS7006: Parameter 'arg' implicitly has an 'any' type. -tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration01.ts(41,36): error TS7006: Parameter 'arg' implicitly has an 'any' type. -==== tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration01.ts (6 errors) ==== +==== tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTypedClassExpressionMethodDeclaration01.ts (2 errors) ==== interface A { numProp: number; } @@ -38,13 +34,9 @@ tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTyp function getFoo2(): Foo { return class { static method1 = (arg) => { - ~~~ -!!! error TS7006: Parameter 'arg' implicitly has an 'any' type. arg.numProp = 10; } static method2 = (arg) => { - ~~~ -!!! error TS7006: Parameter 'arg' implicitly has an 'any' type. arg.strProp = "hello"; } } @@ -53,13 +45,9 @@ tests/cases/conformance/types/contextualTypes/methodDeclarations/contextuallyTyp function getFoo3(): Foo { return class { static method1 = function (arg) { - ~~~ -!!! error TS7006: Parameter 'arg' implicitly has an 'any' type. arg.numProp = 10; } static method2 = function (arg) { - ~~~ -!!! error TS7006: Parameter 'arg' implicitly has an 'any' type. arg.strProp = "hello"; } } diff --git a/tests/baselines/reference/contextuallyTypedClassExpressionMethodDeclaration01.symbols b/tests/baselines/reference/contextuallyTypedClassExpressionMethodDeclaration01.symbols index 0f3fca3824b..e305c38300c 100644 --- a/tests/baselines/reference/contextuallyTypedClassExpressionMethodDeclaration01.symbols +++ b/tests/baselines/reference/contextuallyTypedClassExpressionMethodDeclaration01.symbols @@ -59,14 +59,18 @@ function getFoo2(): Foo { >arg : Symbol(arg, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 26, 26)) arg.numProp = 10; +>arg.numProp : Symbol(A.numProp, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 0, 13)) >arg : Symbol(arg, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 26, 26)) +>numProp : Symbol(A.numProp, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 0, 13)) } static method2 = (arg) => { >method2 : Symbol((Anonymous class).method2, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 28, 9)) >arg : Symbol(arg, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 29, 26)) arg.strProp = "hello"; +>arg.strProp : Symbol(B.strProp, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 4, 14)) >arg : Symbol(arg, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 29, 26)) +>strProp : Symbol(B.strProp, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 4, 14)) } } } @@ -81,14 +85,18 @@ function getFoo3(): Foo { >arg : Symbol(arg, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 37, 35)) arg.numProp = 10; +>arg.numProp : Symbol(A.numProp, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 0, 13)) >arg : Symbol(arg, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 37, 35)) +>numProp : Symbol(A.numProp, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 0, 13)) } static method2 = function (arg) { >method2 : Symbol((Anonymous class).method2, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 39, 9)) >arg : Symbol(arg, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 40, 35)) arg.strProp = "hello"; +>arg.strProp : Symbol(B.strProp, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 4, 14)) >arg : Symbol(arg, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 40, 35)) +>strProp : Symbol(B.strProp, Decl(contextuallyTypedClassExpressionMethodDeclaration01.ts, 4, 14)) } } } diff --git a/tests/baselines/reference/contextuallyTypedClassExpressionMethodDeclaration01.types b/tests/baselines/reference/contextuallyTypedClassExpressionMethodDeclaration01.types index 3f321dcecb6..d3f439ca697 100644 --- a/tests/baselines/reference/contextuallyTypedClassExpressionMethodDeclaration01.types +++ b/tests/baselines/reference/contextuallyTypedClassExpressionMethodDeclaration01.types @@ -57,27 +57,27 @@ function getFoo2(): Foo { >class { static method1 = (arg) => { arg.numProp = 10; } static method2 = (arg) => { arg.strProp = "hello"; } } : typeof (Anonymous class) static method1 = (arg) => { ->method1 : (arg: any) => void ->(arg) => { arg.numProp = 10; } : (arg: any) => void ->arg : any +>method1 : (arg: A) => void +>(arg) => { arg.numProp = 10; } : (arg: A) => void +>arg : A arg.numProp = 10; >arg.numProp = 10 : 10 ->arg.numProp : any ->arg : any ->numProp : any +>arg.numProp : number +>arg : A +>numProp : number >10 : 10 } static method2 = (arg) => { ->method2 : (arg: any) => void ->(arg) => { arg.strProp = "hello"; } : (arg: any) => void ->arg : any +>method2 : (arg: B) => void +>(arg) => { arg.strProp = "hello"; } : (arg: B) => void +>arg : B arg.strProp = "hello"; >arg.strProp = "hello" : "hello" ->arg.strProp : any ->arg : any ->strProp : any +>arg.strProp : string +>arg : B +>strProp : string >"hello" : "hello" } } @@ -90,27 +90,27 @@ function getFoo3(): Foo { >class { static method1 = function (arg) { arg.numProp = 10; } static method2 = function (arg) { arg.strProp = "hello"; } } : typeof (Anonymous class) static method1 = function (arg) { ->method1 : (arg: any) => void ->function (arg) { arg.numProp = 10; } : (arg: any) => void ->arg : any +>method1 : (arg: A) => void +>function (arg) { arg.numProp = 10; } : (arg: A) => void +>arg : A arg.numProp = 10; >arg.numProp = 10 : 10 ->arg.numProp : any ->arg : any ->numProp : any +>arg.numProp : number +>arg : A +>numProp : number >10 : 10 } static method2 = function (arg) { ->method2 : (arg: any) => void ->function (arg) { arg.strProp = "hello"; } : (arg: any) => void ->arg : any +>method2 : (arg: B) => void +>function (arg) { arg.strProp = "hello"; } : (arg: B) => void +>arg : B arg.strProp = "hello"; >arg.strProp = "hello" : "hello" ->arg.strProp : any ->arg : any ->strProp : any +>arg.strProp : string +>arg : B +>strProp : string >"hello" : "hello" } } diff --git a/tests/baselines/reference/controlFlowAssignmentExpression.js b/tests/baselines/reference/controlFlowAssignmentExpression.js index cf8d70b92de..19c9210ea7a 100644 --- a/tests/baselines/reference/controlFlowAssignmentExpression.js +++ b/tests/baselines/reference/controlFlowAssignmentExpression.js @@ -9,7 +9,14 @@ x; // number x = true; (x = "", obj).foo = (x = x.length); x; // number - + +// https://github.com/microsoft/TypeScript/issues/35484 +type D = { done: true, value: 1 } | { done: false, value: 2 }; +declare function fn(): D; +let o: D; +if ((o = fn()).done) { + const y: 1 = o.value; +} //// [controlFlowAssignmentExpression.js] var x; @@ -20,3 +27,7 @@ x; // number x = true; (x = "", obj).foo = (x = x.length); x; // number +var o; +if ((o = fn()).done) { + var y = o.value; +} diff --git a/tests/baselines/reference/controlFlowAssignmentExpression.symbols b/tests/baselines/reference/controlFlowAssignmentExpression.symbols index 73aa8bd7850..b6269056b74 100644 --- a/tests/baselines/reference/controlFlowAssignmentExpression.symbols +++ b/tests/baselines/reference/controlFlowAssignmentExpression.symbols @@ -31,3 +31,31 @@ x = true; x; // number >x : Symbol(x, Decl(controlFlowAssignmentExpression.ts, 0, 3)) +// https://github.com/microsoft/TypeScript/issues/35484 +type D = { done: true, value: 1 } | { done: false, value: 2 }; +>D : Symbol(D, Decl(controlFlowAssignmentExpression.ts, 9, 2)) +>done : Symbol(done, Decl(controlFlowAssignmentExpression.ts, 12, 10)) +>value : Symbol(value, Decl(controlFlowAssignmentExpression.ts, 12, 22)) +>done : Symbol(done, Decl(controlFlowAssignmentExpression.ts, 12, 37)) +>value : Symbol(value, Decl(controlFlowAssignmentExpression.ts, 12, 50)) + +declare function fn(): D; +>fn : Symbol(fn, Decl(controlFlowAssignmentExpression.ts, 12, 62)) +>D : Symbol(D, Decl(controlFlowAssignmentExpression.ts, 9, 2)) + +let o: D; +>o : Symbol(o, Decl(controlFlowAssignmentExpression.ts, 14, 3)) +>D : Symbol(D, Decl(controlFlowAssignmentExpression.ts, 9, 2)) + +if ((o = fn()).done) { +>(o = fn()).done : Symbol(done, Decl(controlFlowAssignmentExpression.ts, 12, 10), Decl(controlFlowAssignmentExpression.ts, 12, 37)) +>o : Symbol(o, Decl(controlFlowAssignmentExpression.ts, 14, 3)) +>fn : Symbol(fn, Decl(controlFlowAssignmentExpression.ts, 12, 62)) +>done : Symbol(done, Decl(controlFlowAssignmentExpression.ts, 12, 10), Decl(controlFlowAssignmentExpression.ts, 12, 37)) + + const y: 1 = o.value; +>y : Symbol(y, Decl(controlFlowAssignmentExpression.ts, 16, 9)) +>o.value : Symbol(value, Decl(controlFlowAssignmentExpression.ts, 12, 22)) +>o : Symbol(o, Decl(controlFlowAssignmentExpression.ts, 14, 3)) +>value : Symbol(value, Decl(controlFlowAssignmentExpression.ts, 12, 22)) +} diff --git a/tests/baselines/reference/controlFlowAssignmentExpression.types b/tests/baselines/reference/controlFlowAssignmentExpression.types index 4cc2c52cc1b..d56aee7c767 100644 --- a/tests/baselines/reference/controlFlowAssignmentExpression.types +++ b/tests/baselines/reference/controlFlowAssignmentExpression.types @@ -45,3 +45,34 @@ x = true; x; // number >x : number +// https://github.com/microsoft/TypeScript/issues/35484 +type D = { done: true, value: 1 } | { done: false, value: 2 }; +>D : D +>done : true +>true : true +>value : 1 +>done : false +>false : false +>value : 2 + +declare function fn(): D; +>fn : () => D + +let o: D; +>o : D + +if ((o = fn()).done) { +>(o = fn()).done : boolean +>(o = fn()) : D +>o = fn() : D +>o : D +>fn() : D +>fn : () => D +>done : boolean + + const y: 1 = o.value; +>y : 1 +>o.value : 1 +>o : { done: true; value: 1; } +>value : 1 +} diff --git a/tests/baselines/reference/controlFlowCaching.types b/tests/baselines/reference/controlFlowCaching.types index f78de65da5a..6af21ab0a3e 100644 --- a/tests/baselines/reference/controlFlowCaching.types +++ b/tests/baselines/reference/controlFlowCaching.types @@ -539,8 +539,8 @@ function f(dim, offsets, arr, acommon, centerAnchorLimit, g, has, lin) { >titleRotation = (taTitleOrientation && taTitleOrientation == "away") ? 180 : 0 : 0 | 180 >titleRotation : number >(taTitleOrientation && taTitleOrientation == "away") ? 180 : 0 : 0 | 180 ->(taTitleOrientation && taTitleOrientation == "away") : boolean ->taTitleOrientation && taTitleOrientation == "away" : boolean +>(taTitleOrientation && taTitleOrientation == "away") : any +>taTitleOrientation && taTitleOrientation == "away" : any >taTitleOrientation : any >taTitleOrientation == "away" : boolean >taTitleOrientation : any diff --git a/tests/baselines/reference/controlFlowPrivateClassField.js b/tests/baselines/reference/controlFlowPrivateClassField.js new file mode 100644 index 00000000000..0ec517e098d --- /dev/null +++ b/tests/baselines/reference/controlFlowPrivateClassField.js @@ -0,0 +1,51 @@ +//// [controlFlowPrivateClassField.ts] +class Example { + #test; + + constructor(test: number) { + this.#test = test; + } + + get test() { + return this.#test + } +} + +class Example2 { + #test; + + constructor(test: number | undefined) { + this.#test = test; + } + + get test() { + if (this.#test) { + return this.#test + } + return 0; + } +} + +//// [controlFlowPrivateClassField.js] +"use strict"; +class Example { + constructor(test) { + this.#test = test; + } + #test; + get test() { + return this.#test; + } +} +class Example2 { + constructor(test) { + this.#test = test; + } + #test; + get test() { + if (this.#test) { + return this.#test; + } + return 0; + } +} diff --git a/tests/baselines/reference/controlFlowPrivateClassField.symbols b/tests/baselines/reference/controlFlowPrivateClassField.symbols new file mode 100644 index 00000000000..d2d9faf0bc4 --- /dev/null +++ b/tests/baselines/reference/controlFlowPrivateClassField.symbols @@ -0,0 +1,54 @@ +=== tests/cases/compiler/controlFlowPrivateClassField.ts === +class Example { +>Example : Symbol(Example, Decl(controlFlowPrivateClassField.ts, 0, 0)) + + #test; +>#test : Symbol(Example.#test, Decl(controlFlowPrivateClassField.ts, 0, 15)) + + constructor(test: number) { +>test : Symbol(test, Decl(controlFlowPrivateClassField.ts, 3, 16)) + + this.#test = test; +>this.#test : Symbol(Example.#test, Decl(controlFlowPrivateClassField.ts, 0, 15)) +>this : Symbol(Example, Decl(controlFlowPrivateClassField.ts, 0, 0)) +>test : Symbol(test, Decl(controlFlowPrivateClassField.ts, 3, 16)) + } + + get test() { +>test : Symbol(Example.test, Decl(controlFlowPrivateClassField.ts, 5, 5)) + + return this.#test +>this.#test : Symbol(Example.#test, Decl(controlFlowPrivateClassField.ts, 0, 15)) +>this : Symbol(Example, Decl(controlFlowPrivateClassField.ts, 0, 0)) + } +} + +class Example2 { +>Example2 : Symbol(Example2, Decl(controlFlowPrivateClassField.ts, 10, 1)) + + #test; +>#test : Symbol(Example2.#test, Decl(controlFlowPrivateClassField.ts, 12, 16)) + + constructor(test: number | undefined) { +>test : Symbol(test, Decl(controlFlowPrivateClassField.ts, 15, 16)) + + this.#test = test; +>this.#test : Symbol(Example2.#test, Decl(controlFlowPrivateClassField.ts, 12, 16)) +>this : Symbol(Example2, Decl(controlFlowPrivateClassField.ts, 10, 1)) +>test : Symbol(test, Decl(controlFlowPrivateClassField.ts, 15, 16)) + } + + get test() { +>test : Symbol(Example2.test, Decl(controlFlowPrivateClassField.ts, 17, 5)) + + if (this.#test) { +>this.#test : Symbol(Example2.#test, Decl(controlFlowPrivateClassField.ts, 12, 16)) +>this : Symbol(Example2, Decl(controlFlowPrivateClassField.ts, 10, 1)) + + return this.#test +>this.#test : Symbol(Example2.#test, Decl(controlFlowPrivateClassField.ts, 12, 16)) +>this : Symbol(Example2, Decl(controlFlowPrivateClassField.ts, 10, 1)) + } + return 0; + } +} diff --git a/tests/baselines/reference/controlFlowPrivateClassField.types b/tests/baselines/reference/controlFlowPrivateClassField.types new file mode 100644 index 00000000000..cab3017d94f --- /dev/null +++ b/tests/baselines/reference/controlFlowPrivateClassField.types @@ -0,0 +1,57 @@ +=== tests/cases/compiler/controlFlowPrivateClassField.ts === +class Example { +>Example : Example + + #test; +>#test : number + + constructor(test: number) { +>test : number + + this.#test = test; +>this.#test = test : number +>this.#test : number +>this : this +>test : number + } + + get test() { +>test : number + + return this.#test +>this.#test : number +>this : this + } +} + +class Example2 { +>Example2 : Example2 + + #test; +>#test : number | undefined + + constructor(test: number | undefined) { +>test : number | undefined + + this.#test = test; +>this.#test = test : number | undefined +>this.#test : number | undefined +>this : this +>test : number | undefined + } + + get test() { +>test : number + + if (this.#test) { +>this.#test : number | undefined +>this : this + + return this.#test +>this.#test : number +>this : this + } + return 0; +>0 : 0 + } +} diff --git a/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty1.js b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty1.js new file mode 100644 index 00000000000..1c2b4b8a449 --- /dev/null +++ b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty1.js @@ -0,0 +1,636 @@ +//// [convertClassExpressionToFunctionFromObjectProperty1.ts] +const foo: any = {}; + +// properties +foo.x = class { + constructor () {} +} +foo.y = class { + constructor () {} +} + +// keywords +foo.break = class { + constructor () {} +} +foo.case = class { + constructor () {} +} +foo.catch = class { + constructor () {} +} +foo.class = class { + constructor () {} +} +foo.const = class { + constructor () {} +} +foo.continue = class { + constructor () {} +} +foo.debugger = class { + constructor () {} +} +foo.default = class { + constructor () {} +} +foo.delete = class { + constructor () {} +} +foo.do = class { + constructor () {} +} +foo.else = class { + constructor () {} +} +foo.enum = class { + constructor () {} +} +foo.export = class { + constructor () {} +} +foo.extends = class { + constructor () {} +} +foo.false = class { + constructor () {} +} +foo.finally = class { + constructor () {} +} +foo.for = class { + constructor () {} +} +foo.function = class { + constructor () {} +} +foo.if = class { + constructor () {} +} +foo.import = class { + constructor () {} +} +foo.in = class { + constructor () {} +} +foo.instanceof = class { + constructor () {} +} +foo.new = class { + constructor () {} +} +foo.null = class { + constructor () {} +} +foo.return = class { + constructor () {} +} +foo.super = class { + constructor () {} +} +foo.switch = class { + constructor () {} +} +foo.this = class { + constructor () {} +} +foo.throw = class { + constructor () {} +} +foo.true = class { + constructor () {} +} +foo.try = class { + constructor () {} +} +foo.typeof = class { + constructor () {} +} +foo.var = class { + constructor () {} +} +foo.void = class { + constructor () {} +} +foo.while = class { + constructor () {} +} +foo.with = class { + constructor () {} +} +foo.implements = class { + constructor () {} +} +foo.interface = class { + constructor () {} +} +foo.let = class { + constructor () {} +} +foo.package = class { + constructor () {} +} +foo.private = class { + constructor () {} +} +foo.protected = class { + constructor () {} +} +foo.public = class { + constructor () {} +} +foo.static = class { + constructor () {} +} +foo.yield = class { + constructor () {} +} +foo.abstract = class { + constructor () {} +} +foo.as = class { + constructor () {} +} +foo.asserts = class { + constructor () {} +} +foo.any = class { + constructor () {} +} +foo.async = class { + constructor () {} +} +foo.await = class { + constructor () {} +} +foo.boolean = class { + constructor () {} +} +foo.constructor = class { + constructor () {} +} +foo.declare = class { + constructor () {} +} +foo.get = class { + constructor () {} +} +foo.infer = class { + constructor () {} +} +foo.is = class { + constructor () {} +} +foo.keyof = class { + constructor () {} +} +foo.module = class { + constructor () {} +} +foo.namespace = class { + constructor () {} +} +foo.never = class { + constructor () {} +} +foo.readonly = class { + constructor () {} +} +foo.require = class { + constructor () {} +} +foo.number = class { + constructor () {} +} +foo.object = class { + constructor () {} +} +foo.set = class { + constructor () {} +} +foo.string = class { + constructor () {} +} +foo.symbol = class { + constructor () {} +} +foo.type = class { + constructor () {} +} +foo.undefined = class { + constructor () {} +} +foo.unique = class { + constructor () {} +} +foo.unknown = class { + constructor () {} +} +foo.from = class { + constructor () {} +} +foo.global = class { + constructor () {} +} +foo.bigint = class { + constructor () {} +} +foo.of = class { + constructor () {} +} + + +//// [convertClassExpressionToFunctionFromObjectProperty1.js] +var foo = {}; +// properties +foo.x = /** @class */ (function () { + function x() { + } + return x; +}()); +foo.y = /** @class */ (function () { + function y() { + } + return y; +}()); +// keywords +foo.break = /** @class */ (function () { + function break_1() { + } + return break_1; +}()); +foo.case = /** @class */ (function () { + function case_1() { + } + return case_1; +}()); +foo.catch = /** @class */ (function () { + function catch_1() { + } + return catch_1; +}()); +foo.class = /** @class */ (function () { + function class_1() { + } + return class_1; +}()); +foo.const = /** @class */ (function () { + function const_1() { + } + return const_1; +}()); +foo.continue = /** @class */ (function () { + function continue_1() { + } + return continue_1; +}()); +foo.debugger = /** @class */ (function () { + function debugger_1() { + } + return debugger_1; +}()); +foo.default = /** @class */ (function () { + function default_1() { + } + return default_1; +}()); +foo.delete = /** @class */ (function () { + function delete_1() { + } + return delete_1; +}()); +foo.do = /** @class */ (function () { + function do_1() { + } + return do_1; +}()); +foo.else = /** @class */ (function () { + function else_1() { + } + return else_1; +}()); +foo.enum = /** @class */ (function () { + function enum_1() { + } + return enum_1; +}()); +foo.export = /** @class */ (function () { + function export_1() { + } + return export_1; +}()); +foo.extends = /** @class */ (function () { + function extends_1() { + } + return extends_1; +}()); +foo.false = /** @class */ (function () { + function false_1() { + } + return false_1; +}()); +foo.finally = /** @class */ (function () { + function finally_1() { + } + return finally_1; +}()); +foo.for = /** @class */ (function () { + function for_1() { + } + return for_1; +}()); +foo.function = /** @class */ (function () { + function function_1() { + } + return function_1; +}()); +foo.if = /** @class */ (function () { + function if_1() { + } + return if_1; +}()); +foo.import = /** @class */ (function () { + function import_1() { + } + return import_1; +}()); +foo.in = /** @class */ (function () { + function in_1() { + } + return in_1; +}()); +foo.instanceof = /** @class */ (function () { + function instanceof_1() { + } + return instanceof_1; +}()); +foo.new = /** @class */ (function () { + function new_1() { + } + return new_1; +}()); +foo.null = /** @class */ (function () { + function null_1() { + } + return null_1; +}()); +foo.return = /** @class */ (function () { + function return_1() { + } + return return_1; +}()); +foo.super = /** @class */ (function () { + function super_1() { + } + return super_1; +}()); +foo.switch = /** @class */ (function () { + function switch_1() { + } + return switch_1; +}()); +foo.this = /** @class */ (function () { + function this_1() { + } + return this_1; +}()); +foo.throw = /** @class */ (function () { + function throw_1() { + } + return throw_1; +}()); +foo.true = /** @class */ (function () { + function true_1() { + } + return true_1; +}()); +foo.try = /** @class */ (function () { + function try_1() { + } + return try_1; +}()); +foo.typeof = /** @class */ (function () { + function typeof_1() { + } + return typeof_1; +}()); +foo.var = /** @class */ (function () { + function var_1() { + } + return var_1; +}()); +foo.void = /** @class */ (function () { + function void_1() { + } + return void_1; +}()); +foo.while = /** @class */ (function () { + function while_1() { + } + return while_1; +}()); +foo.with = /** @class */ (function () { + function with_1() { + } + return with_1; +}()); +foo.implements = /** @class */ (function () { + function implements_1() { + } + return implements_1; +}()); +foo.interface = /** @class */ (function () { + function interface_1() { + } + return interface_1; +}()); +foo.let = /** @class */ (function () { + function let_1() { + } + return let_1; +}()); +foo.package = /** @class */ (function () { + function package_1() { + } + return package_1; +}()); +foo.private = /** @class */ (function () { + function private_1() { + } + return private_1; +}()); +foo.protected = /** @class */ (function () { + function protected_1() { + } + return protected_1; +}()); +foo.public = /** @class */ (function () { + function public_1() { + } + return public_1; +}()); +foo.static = /** @class */ (function () { + function static_1() { + } + return static_1; +}()); +foo.yield = /** @class */ (function () { + function yield_1() { + } + return yield_1; +}()); +foo.abstract = /** @class */ (function () { + function abstract() { + } + return abstract; +}()); +foo.as = /** @class */ (function () { + function as() { + } + return as; +}()); +foo.asserts = /** @class */ (function () { + function asserts() { + } + return asserts; +}()); +foo.any = /** @class */ (function () { + function any() { + } + return any; +}()); +foo.async = /** @class */ (function () { + function async() { + } + return async; +}()); +foo.await = /** @class */ (function () { + function await() { + } + return await; +}()); +foo.boolean = /** @class */ (function () { + function boolean() { + } + return boolean; +}()); +foo.constructor = /** @class */ (function () { + function constructor() { + } + return constructor; +}()); +foo.declare = /** @class */ (function () { + function declare() { + } + return declare; +}()); +foo.get = /** @class */ (function () { + function get() { + } + return get; +}()); +foo.infer = /** @class */ (function () { + function infer() { + } + return infer; +}()); +foo.is = /** @class */ (function () { + function is() { + } + return is; +}()); +foo.keyof = /** @class */ (function () { + function keyof() { + } + return keyof; +}()); +foo.module = /** @class */ (function () { + function module() { + } + return module; +}()); +foo.namespace = /** @class */ (function () { + function namespace() { + } + return namespace; +}()); +foo.never = /** @class */ (function () { + function never() { + } + return never; +}()); +foo.readonly = /** @class */ (function () { + function readonly() { + } + return readonly; +}()); +foo.require = /** @class */ (function () { + function require() { + } + return require; +}()); +foo.number = /** @class */ (function () { + function number() { + } + return number; +}()); +foo.object = /** @class */ (function () { + function object() { + } + return object; +}()); +foo.set = /** @class */ (function () { + function set() { + } + return set; +}()); +foo.string = /** @class */ (function () { + function string() { + } + return string; +}()); +foo.symbol = /** @class */ (function () { + function symbol() { + } + return symbol; +}()); +foo.type = /** @class */ (function () { + function type() { + } + return type; +}()); +foo.undefined = /** @class */ (function () { + function undefined() { + } + return undefined; +}()); +foo.unique = /** @class */ (function () { + function unique() { + } + return unique; +}()); +foo.unknown = /** @class */ (function () { + function unknown() { + } + return unknown; +}()); +foo.from = /** @class */ (function () { + function from() { + } + return from; +}()); +foo.global = /** @class */ (function () { + function global() { + } + return global; +}()); +foo.bigint = /** @class */ (function () { + function bigint() { + } + return bigint; +}()); +foo.of = /** @class */ (function () { + function of() { + } + return of; +}()); diff --git a/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty1.symbols b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty1.symbols new file mode 100644 index 00000000000..923b52e7e14 --- /dev/null +++ b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty1.symbols @@ -0,0 +1,398 @@ +=== tests/cases/compiler/convertClassExpressionToFunctionFromObjectProperty1.ts === +const foo: any = {}; +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + +// properties +foo.x = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.y = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} + +// keywords +foo.break = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.case = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.catch = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.class = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.const = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.continue = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.debugger = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.default = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.delete = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.do = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.else = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.enum = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.export = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.extends = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.false = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.finally = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.for = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.function = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.if = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.import = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.in = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.instanceof = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.new = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.null = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.return = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.super = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.switch = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.this = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.throw = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.true = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.try = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.typeof = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.var = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.void = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.while = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.with = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.implements = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.interface = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.let = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.package = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.private = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.protected = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.public = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.static = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.yield = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.abstract = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.as = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.asserts = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.any = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.async = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.await = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.boolean = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.constructor = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.declare = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.get = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.infer = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.is = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.keyof = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.module = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.namespace = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.never = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.readonly = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.require = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.number = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.object = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.set = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.string = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.symbol = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.type = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.undefined = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.unique = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.unknown = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.from = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.global = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.bigint = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} +foo.of = class { +>foo : Symbol(foo, Decl(convertClassExpressionToFunctionFromObjectProperty1.ts, 0, 5)) + + constructor () {} +} + diff --git a/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty1.types b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty1.types new file mode 100644 index 00000000000..045947b6a92 --- /dev/null +++ b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty1.types @@ -0,0 +1,711 @@ +=== tests/cases/compiler/convertClassExpressionToFunctionFromObjectProperty1.ts === +const foo: any = {}; +>foo : any +>{} : {} + +// properties +foo.x = class { +>foo.x = class { constructor () {}} : typeof x +>foo.x : any +>foo : any +>x : any +>class { constructor () {}} : typeof x + + constructor () {} +} +foo.y = class { +>foo.y = class { constructor () {}} : typeof y +>foo.y : any +>foo : any +>y : any +>class { constructor () {}} : typeof y + + constructor () {} +} + +// keywords +foo.break = class { +>foo.break = class { constructor () {}} : typeof break +>foo.break : any +>foo : any +>break : any +>class { constructor () {}} : typeof break + + constructor () {} +} +foo.case = class { +>foo.case = class { constructor () {}} : typeof case +>foo.case : any +>foo : any +>case : any +>class { constructor () {}} : typeof case + + constructor () {} +} +foo.catch = class { +>foo.catch = class { constructor () {}} : typeof catch +>foo.catch : any +>foo : any +>catch : any +>class { constructor () {}} : typeof catch + + constructor () {} +} +foo.class = class { +>foo.class = class { constructor () {}} : typeof class +>foo.class : any +>foo : any +>class : any +>class { constructor () {}} : typeof class + + constructor () {} +} +foo.const = class { +>foo.const = class { constructor () {}} : typeof const +>foo.const : any +>foo : any +>const : any +>class { constructor () {}} : typeof const + + constructor () {} +} +foo.continue = class { +>foo.continue = class { constructor () {}} : typeof continue +>foo.continue : any +>foo : any +>continue : any +>class { constructor () {}} : typeof continue + + constructor () {} +} +foo.debugger = class { +>foo.debugger = class { constructor () {}} : typeof debugger +>foo.debugger : any +>foo : any +>debugger : any +>class { constructor () {}} : typeof debugger + + constructor () {} +} +foo.default = class { +>foo.default = class { constructor () {}} : typeof default +>foo.default : any +>foo : any +>default : any +>class { constructor () {}} : typeof default + + constructor () {} +} +foo.delete = class { +>foo.delete = class { constructor () {}} : typeof delete +>foo.delete : any +>foo : any +>delete : any +>class { constructor () {}} : typeof delete + + constructor () {} +} +foo.do = class { +>foo.do = class { constructor () {}} : typeof do +>foo.do : any +>foo : any +>do : any +>class { constructor () {}} : typeof do + + constructor () {} +} +foo.else = class { +>foo.else = class { constructor () {}} : typeof else +>foo.else : any +>foo : any +>else : any +>class { constructor () {}} : typeof else + + constructor () {} +} +foo.enum = class { +>foo.enum = class { constructor () {}} : typeof enum +>foo.enum : any +>foo : any +>enum : any +>class { constructor () {}} : typeof enum + + constructor () {} +} +foo.export = class { +>foo.export = class { constructor () {}} : typeof export +>foo.export : any +>foo : any +>export : any +>class { constructor () {}} : typeof export + + constructor () {} +} +foo.extends = class { +>foo.extends = class { constructor () {}} : typeof extends +>foo.extends : any +>foo : any +>extends : any +>class { constructor () {}} : typeof extends + + constructor () {} +} +foo.false = class { +>foo.false = class { constructor () {}} : typeof false +>foo.false : any +>foo : any +>false : any +>class { constructor () {}} : typeof false + + constructor () {} +} +foo.finally = class { +>foo.finally = class { constructor () {}} : typeof finally +>foo.finally : any +>foo : any +>finally : any +>class { constructor () {}} : typeof finally + + constructor () {} +} +foo.for = class { +>foo.for = class { constructor () {}} : typeof for +>foo.for : any +>foo : any +>for : any +>class { constructor () {}} : typeof for + + constructor () {} +} +foo.function = class { +>foo.function = class { constructor () {}} : typeof function +>foo.function : any +>foo : any +>function : any +>class { constructor () {}} : typeof function + + constructor () {} +} +foo.if = class { +>foo.if = class { constructor () {}} : typeof if +>foo.if : any +>foo : any +>if : any +>class { constructor () {}} : typeof if + + constructor () {} +} +foo.import = class { +>foo.import = class { constructor () {}} : typeof import +>foo.import : any +>foo : any +>import : any +>class { constructor () {}} : typeof import + + constructor () {} +} +foo.in = class { +>foo.in = class { constructor () {}} : typeof in +>foo.in : any +>foo : any +>in : any +>class { constructor () {}} : typeof in + + constructor () {} +} +foo.instanceof = class { +>foo.instanceof = class { constructor () {}} : typeof instanceof +>foo.instanceof : any +>foo : any +>instanceof : any +>class { constructor () {}} : typeof instanceof + + constructor () {} +} +foo.new = class { +>foo.new = class { constructor () {}} : typeof new +>foo.new : any +>foo : any +>new : any +>class { constructor () {}} : typeof new + + constructor () {} +} +foo.null = class { +>foo.null = class { constructor () {}} : typeof null +>foo.null : any +>foo : any +>null : any +>class { constructor () {}} : typeof null + + constructor () {} +} +foo.return = class { +>foo.return = class { constructor () {}} : typeof return +>foo.return : any +>foo : any +>return : any +>class { constructor () {}} : typeof return + + constructor () {} +} +foo.super = class { +>foo.super = class { constructor () {}} : typeof super +>foo.super : any +>foo : any +>super : any +>class { constructor () {}} : typeof super + + constructor () {} +} +foo.switch = class { +>foo.switch = class { constructor () {}} : typeof switch +>foo.switch : any +>foo : any +>switch : any +>class { constructor () {}} : typeof switch + + constructor () {} +} +foo.this = class { +>foo.this = class { constructor () {}} : typeof this +>foo.this : any +>foo : any +>this : any +>class { constructor () {}} : typeof this + + constructor () {} +} +foo.throw = class { +>foo.throw = class { constructor () {}} : typeof throw +>foo.throw : any +>foo : any +>throw : any +>class { constructor () {}} : typeof throw + + constructor () {} +} +foo.true = class { +>foo.true = class { constructor () {}} : typeof true +>foo.true : any +>foo : any +>true : any +>class { constructor () {}} : typeof true + + constructor () {} +} +foo.try = class { +>foo.try = class { constructor () {}} : typeof try +>foo.try : any +>foo : any +>try : any +>class { constructor () {}} : typeof try + + constructor () {} +} +foo.typeof = class { +>foo.typeof = class { constructor () {}} : typeof typeof +>foo.typeof : any +>foo : any +>typeof : any +>class { constructor () {}} : typeof typeof + + constructor () {} +} +foo.var = class { +>foo.var = class { constructor () {}} : typeof var +>foo.var : any +>foo : any +>var : any +>class { constructor () {}} : typeof var + + constructor () {} +} +foo.void = class { +>foo.void = class { constructor () {}} : typeof void +>foo.void : any +>foo : any +>void : any +>class { constructor () {}} : typeof void + + constructor () {} +} +foo.while = class { +>foo.while = class { constructor () {}} : typeof while +>foo.while : any +>foo : any +>while : any +>class { constructor () {}} : typeof while + + constructor () {} +} +foo.with = class { +>foo.with = class { constructor () {}} : typeof with +>foo.with : any +>foo : any +>with : any +>class { constructor () {}} : typeof with + + constructor () {} +} +foo.implements = class { +>foo.implements = class { constructor () {}} : typeof implements +>foo.implements : any +>foo : any +>implements : any +>class { constructor () {}} : typeof implements + + constructor () {} +} +foo.interface = class { +>foo.interface = class { constructor () {}} : typeof interface +>foo.interface : any +>foo : any +>interface : any +>class { constructor () {}} : typeof interface + + constructor () {} +} +foo.let = class { +>foo.let = class { constructor () {}} : typeof let +>foo.let : any +>foo : any +>let : any +>class { constructor () {}} : typeof let + + constructor () {} +} +foo.package = class { +>foo.package = class { constructor () {}} : typeof package +>foo.package : any +>foo : any +>package : any +>class { constructor () {}} : typeof package + + constructor () {} +} +foo.private = class { +>foo.private = class { constructor () {}} : typeof private +>foo.private : any +>foo : any +>private : any +>class { constructor () {}} : typeof private + + constructor () {} +} +foo.protected = class { +>foo.protected = class { constructor () {}} : typeof protected +>foo.protected : any +>foo : any +>protected : any +>class { constructor () {}} : typeof protected + + constructor () {} +} +foo.public = class { +>foo.public = class { constructor () {}} : typeof public +>foo.public : any +>foo : any +>public : any +>class { constructor () {}} : typeof public + + constructor () {} +} +foo.static = class { +>foo.static = class { constructor () {}} : typeof static +>foo.static : any +>foo : any +>static : any +>class { constructor () {}} : typeof static + + constructor () {} +} +foo.yield = class { +>foo.yield = class { constructor () {}} : typeof yield +>foo.yield : any +>foo : any +>yield : any +>class { constructor () {}} : typeof yield + + constructor () {} +} +foo.abstract = class { +>foo.abstract = class { constructor () {}} : typeof abstract +>foo.abstract : any +>foo : any +>abstract : any +>class { constructor () {}} : typeof abstract + + constructor () {} +} +foo.as = class { +>foo.as = class { constructor () {}} : typeof as +>foo.as : any +>foo : any +>as : any +>class { constructor () {}} : typeof as + + constructor () {} +} +foo.asserts = class { +>foo.asserts = class { constructor () {}} : typeof asserts +>foo.asserts : any +>foo : any +>asserts : any +>class { constructor () {}} : typeof asserts + + constructor () {} +} +foo.any = class { +>foo.any = class { constructor () {}} : typeof any +>foo.any : any +>foo : any +>any : any +>class { constructor () {}} : typeof any + + constructor () {} +} +foo.async = class { +>foo.async = class { constructor () {}} : typeof async +>foo.async : any +>foo : any +>async : any +>class { constructor () {}} : typeof async + + constructor () {} +} +foo.await = class { +>foo.await = class { constructor () {}} : typeof await +>foo.await : any +>foo : any +>await : any +>class { constructor () {}} : typeof await + + constructor () {} +} +foo.boolean = class { +>foo.boolean = class { constructor () {}} : typeof boolean +>foo.boolean : any +>foo : any +>boolean : any +>class { constructor () {}} : typeof boolean + + constructor () {} +} +foo.constructor = class { +>foo.constructor = class { constructor () {}} : typeof constructor +>foo.constructor : any +>foo : any +>constructor : any +>class { constructor () {}} : typeof constructor + + constructor () {} +} +foo.declare = class { +>foo.declare = class { constructor () {}} : typeof declare +>foo.declare : any +>foo : any +>declare : any +>class { constructor () {}} : typeof declare + + constructor () {} +} +foo.get = class { +>foo.get = class { constructor () {}} : typeof get +>foo.get : any +>foo : any +>get : any +>class { constructor () {}} : typeof get + + constructor () {} +} +foo.infer = class { +>foo.infer = class { constructor () {}} : typeof infer +>foo.infer : any +>foo : any +>infer : any +>class { constructor () {}} : typeof infer + + constructor () {} +} +foo.is = class { +>foo.is = class { constructor () {}} : typeof is +>foo.is : any +>foo : any +>is : any +>class { constructor () {}} : typeof is + + constructor () {} +} +foo.keyof = class { +>foo.keyof = class { constructor () {}} : typeof keyof +>foo.keyof : any +>foo : any +>keyof : any +>class { constructor () {}} : typeof keyof + + constructor () {} +} +foo.module = class { +>foo.module = class { constructor () {}} : typeof module +>foo.module : any +>foo : any +>module : any +>class { constructor () {}} : typeof module + + constructor () {} +} +foo.namespace = class { +>foo.namespace = class { constructor () {}} : typeof namespace +>foo.namespace : any +>foo : any +>namespace : any +>class { constructor () {}} : typeof namespace + + constructor () {} +} +foo.never = class { +>foo.never = class { constructor () {}} : typeof never +>foo.never : any +>foo : any +>never : any +>class { constructor () {}} : typeof never + + constructor () {} +} +foo.readonly = class { +>foo.readonly = class { constructor () {}} : typeof readonly +>foo.readonly : any +>foo : any +>readonly : any +>class { constructor () {}} : typeof readonly + + constructor () {} +} +foo.require = class { +>foo.require = class { constructor () {}} : typeof require +>foo.require : any +>foo : any +>require : any +>class { constructor () {}} : typeof require + + constructor () {} +} +foo.number = class { +>foo.number = class { constructor () {}} : typeof number +>foo.number : any +>foo : any +>number : any +>class { constructor () {}} : typeof number + + constructor () {} +} +foo.object = class { +>foo.object = class { constructor () {}} : typeof object +>foo.object : any +>foo : any +>object : any +>class { constructor () {}} : typeof object + + constructor () {} +} +foo.set = class { +>foo.set = class { constructor () {}} : typeof set +>foo.set : any +>foo : any +>set : any +>class { constructor () {}} : typeof set + + constructor () {} +} +foo.string = class { +>foo.string = class { constructor () {}} : typeof string +>foo.string : any +>foo : any +>string : any +>class { constructor () {}} : typeof string + + constructor () {} +} +foo.symbol = class { +>foo.symbol = class { constructor () {}} : typeof symbol +>foo.symbol : any +>foo : any +>symbol : any +>class { constructor () {}} : typeof symbol + + constructor () {} +} +foo.type = class { +>foo.type = class { constructor () {}} : typeof type +>foo.type : any +>foo : any +>type : any +>class { constructor () {}} : typeof type + + constructor () {} +} +foo.undefined = class { +>foo.undefined = class { constructor () {}} : typeof undefined +>foo.undefined : any +>foo : any +>undefined : any +>class { constructor () {}} : typeof undefined + + constructor () {} +} +foo.unique = class { +>foo.unique = class { constructor () {}} : typeof unique +>foo.unique : any +>foo : any +>unique : any +>class { constructor () {}} : typeof unique + + constructor () {} +} +foo.unknown = class { +>foo.unknown = class { constructor () {}} : typeof unknown +>foo.unknown : any +>foo : any +>unknown : any +>class { constructor () {}} : typeof unknown + + constructor () {} +} +foo.from = class { +>foo.from = class { constructor () {}} : typeof from +>foo.from : any +>foo : any +>from : any +>class { constructor () {}} : typeof from + + constructor () {} +} +foo.global = class { +>foo.global = class { constructor () {}} : typeof global +>foo.global : any +>foo : any +>global : any +>class { constructor () {}} : typeof global + + constructor () {} +} +foo.bigint = class { +>foo.bigint = class { constructor () {}} : typeof bigint +>foo.bigint : any +>foo : any +>bigint : any +>class { constructor () {}} : typeof bigint + + constructor () {} +} +foo.of = class { +>foo.of = class { constructor () {}} : typeof of +>foo.of : any +>foo : any +>of : any +>class { constructor () {}} : typeof of + + constructor () {} +} + diff --git a/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty2.js b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty2.js new file mode 100644 index 00000000000..f5962ddcae0 --- /dev/null +++ b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty2.js @@ -0,0 +1,635 @@ +//// [convertClassExpressionToFunctionFromObjectProperty2.ts] +({ + x: class { + constructor() { } + }, + y: class { + constructor() { } + }, + + // keywords + break: class { + constructor() { } + }, + case: class { + constructor() { } + }, + catch: class { + constructor() { } + }, + class: class { + constructor() { } + }, + const: class { + constructor() { } + }, + continue: class { + constructor() { } + }, + debugger: class { + constructor() { } + }, + default: class { + constructor() { } + }, + delete: class { + constructor() { } + }, + do: class { + constructor() { } + }, + else: class { + constructor() { } + }, + enum: class { + constructor() { } + }, + export: class { + constructor() { } + }, + extends: class { + constructor() { } + }, + false: class { + constructor() { } + }, + finally: class { + constructor() { } + }, + for: class { + constructor() { } + }, + function: class { + constructor() { } + }, + if: class { + constructor() { } + }, + import: class { + constructor() { } + }, + in: class { + constructor() { } + }, + instanceof: class { + constructor() { } + }, + new: class { + constructor() { } + }, + null: class { + constructor() { } + }, + return: class { + constructor() { } + }, + super: class { + constructor() { } + }, + switch: class { + constructor() { } + }, + this: class { + constructor() { } + }, + throw: class { + constructor() { } + }, + true: class { + constructor() { } + }, + try: class { + constructor() { } + }, + typeof: class { + constructor() { } + }, + var: class { + constructor() { } + }, + void: class { + constructor() { } + }, + while: class { + constructor() { } + }, + with: class { + constructor() { } + }, + implements: class { + constructor() { } + }, + interface: class { + constructor() { } + }, + let: class { + constructor() { } + }, + package: class { + constructor() { } + }, + private: class { + constructor() { } + }, + protected: class { + constructor() { } + }, + public: class { + constructor() { } + }, + static: class { + constructor() { } + }, + yield: class { + constructor() { } + }, + abstract: class { + constructor() { } + }, + as: class { + constructor() { } + }, + asserts: class { + constructor() { } + }, + any: class { + constructor() { } + }, + async: class { + constructor() { } + }, + await: class { + constructor() { } + }, + boolean: class { + constructor() { } + }, + constructor: class { + constructor() { } + }, + declare: class { + constructor() { } + }, + get: class { + constructor() { } + }, + infer: class { + constructor() { } + }, + is: class { + constructor() { } + }, + keyof: class { + constructor() { } + }, + module: class { + constructor() { } + }, + namespace: class { + constructor() { } + }, + never: class { + constructor() { } + }, + readonly: class { + constructor() { } + }, + require: class { + constructor() { } + }, + number: class { + constructor() { } + }, + object: class { + constructor() { } + }, + set: class { + constructor() { } + }, + string: class { + constructor() { } + }, + symbol: class { + constructor() { } + }, + type: class { + constructor() { } + }, + undefined: class { + constructor() { } + }, + unique: class { + constructor() { } + }, + unknown: class { + constructor() { } + }, + from: class { + constructor() { } + }, + global: class { + constructor() { } + }, + bigint: class { + constructor() { } + }, + of: class { + constructor() { } + } +}) + + +//// [convertClassExpressionToFunctionFromObjectProperty2.js] +({ + x: /** @class */ (function () { + function x() { + } + return x; + }()), + y: /** @class */ (function () { + function y() { + } + return y; + }()), + // keywords + break: /** @class */ (function () { + function break_1() { + } + return break_1; + }()), + case: /** @class */ (function () { + function case_1() { + } + return case_1; + }()), + catch: /** @class */ (function () { + function catch_1() { + } + return catch_1; + }()), + class: /** @class */ (function () { + function class_1() { + } + return class_1; + }()), + const: /** @class */ (function () { + function const_1() { + } + return const_1; + }()), + continue: /** @class */ (function () { + function continue_1() { + } + return continue_1; + }()), + debugger: /** @class */ (function () { + function debugger_1() { + } + return debugger_1; + }()), + default: /** @class */ (function () { + function default_1() { + } + return default_1; + }()), + delete: /** @class */ (function () { + function delete_1() { + } + return delete_1; + }()), + do: /** @class */ (function () { + function do_1() { + } + return do_1; + }()), + else: /** @class */ (function () { + function else_1() { + } + return else_1; + }()), + enum: /** @class */ (function () { + function enum_1() { + } + return enum_1; + }()), + export: /** @class */ (function () { + function export_1() { + } + return export_1; + }()), + extends: /** @class */ (function () { + function extends_1() { + } + return extends_1; + }()), + false: /** @class */ (function () { + function false_1() { + } + return false_1; + }()), + finally: /** @class */ (function () { + function finally_1() { + } + return finally_1; + }()), + for: /** @class */ (function () { + function for_1() { + } + return for_1; + }()), + function: /** @class */ (function () { + function function_1() { + } + return function_1; + }()), + if: /** @class */ (function () { + function if_1() { + } + return if_1; + }()), + import: /** @class */ (function () { + function import_1() { + } + return import_1; + }()), + in: /** @class */ (function () { + function in_1() { + } + return in_1; + }()), + instanceof: /** @class */ (function () { + function instanceof_1() { + } + return instanceof_1; + }()), + new: /** @class */ (function () { + function new_1() { + } + return new_1; + }()), + null: /** @class */ (function () { + function null_1() { + } + return null_1; + }()), + return: /** @class */ (function () { + function return_1() { + } + return return_1; + }()), + super: /** @class */ (function () { + function super_1() { + } + return super_1; + }()), + switch: /** @class */ (function () { + function switch_1() { + } + return switch_1; + }()), + this: /** @class */ (function () { + function this_1() { + } + return this_1; + }()), + throw: /** @class */ (function () { + function throw_1() { + } + return throw_1; + }()), + true: /** @class */ (function () { + function true_1() { + } + return true_1; + }()), + try: /** @class */ (function () { + function try_1() { + } + return try_1; + }()), + typeof: /** @class */ (function () { + function typeof_1() { + } + return typeof_1; + }()), + var: /** @class */ (function () { + function var_1() { + } + return var_1; + }()), + void: /** @class */ (function () { + function void_1() { + } + return void_1; + }()), + while: /** @class */ (function () { + function while_1() { + } + return while_1; + }()), + with: /** @class */ (function () { + function with_1() { + } + return with_1; + }()), + implements: /** @class */ (function () { + function implements_1() { + } + return implements_1; + }()), + interface: /** @class */ (function () { + function interface_1() { + } + return interface_1; + }()), + let: /** @class */ (function () { + function let_1() { + } + return let_1; + }()), + package: /** @class */ (function () { + function package_1() { + } + return package_1; + }()), + private: /** @class */ (function () { + function private_1() { + } + return private_1; + }()), + protected: /** @class */ (function () { + function protected_1() { + } + return protected_1; + }()), + public: /** @class */ (function () { + function public_1() { + } + return public_1; + }()), + static: /** @class */ (function () { + function static_1() { + } + return static_1; + }()), + yield: /** @class */ (function () { + function yield_1() { + } + return yield_1; + }()), + abstract: /** @class */ (function () { + function abstract() { + } + return abstract; + }()), + as: /** @class */ (function () { + function as() { + } + return as; + }()), + asserts: /** @class */ (function () { + function asserts() { + } + return asserts; + }()), + any: /** @class */ (function () { + function any() { + } + return any; + }()), + async: /** @class */ (function () { + function async() { + } + return async; + }()), + await: /** @class */ (function () { + function await() { + } + return await; + }()), + boolean: /** @class */ (function () { + function boolean() { + } + return boolean; + }()), + constructor: /** @class */ (function () { + function constructor() { + } + return constructor; + }()), + declare: /** @class */ (function () { + function declare() { + } + return declare; + }()), + get: /** @class */ (function () { + function get() { + } + return get; + }()), + infer: /** @class */ (function () { + function infer() { + } + return infer; + }()), + is: /** @class */ (function () { + function is() { + } + return is; + }()), + keyof: /** @class */ (function () { + function keyof() { + } + return keyof; + }()), + module: /** @class */ (function () { + function module() { + } + return module; + }()), + namespace: /** @class */ (function () { + function namespace() { + } + return namespace; + }()), + never: /** @class */ (function () { + function never() { + } + return never; + }()), + readonly: /** @class */ (function () { + function readonly() { + } + return readonly; + }()), + require: /** @class */ (function () { + function require() { + } + return require; + }()), + number: /** @class */ (function () { + function number() { + } + return number; + }()), + object: /** @class */ (function () { + function object() { + } + return object; + }()), + set: /** @class */ (function () { + function set() { + } + return set; + }()), + string: /** @class */ (function () { + function string() { + } + return string; + }()), + symbol: /** @class */ (function () { + function symbol() { + } + return symbol; + }()), + type: /** @class */ (function () { + function type() { + } + return type; + }()), + undefined: /** @class */ (function () { + function undefined() { + } + return undefined; + }()), + unique: /** @class */ (function () { + function unique() { + } + return unique; + }()), + unknown: /** @class */ (function () { + function unknown() { + } + return unknown; + }()), + from: /** @class */ (function () { + function from() { + } + return from; + }()), + global: /** @class */ (function () { + function global() { + } + return global; + }()), + bigint: /** @class */ (function () { + function bigint() { + } + return bigint; + }()), + of: /** @class */ (function () { + function of() { + } + return of; + }()) +}); diff --git a/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty2.symbols b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty2.symbols new file mode 100644 index 00000000000..aeb1957cdcf --- /dev/null +++ b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty2.symbols @@ -0,0 +1,396 @@ +=== tests/cases/compiler/convertClassExpressionToFunctionFromObjectProperty2.ts === +({ + x: class { +>x : Symbol(x, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 0, 2)) + + constructor() { } + }, + y: class { +>y : Symbol(y, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 3, 6)) + + constructor() { } + }, + + // keywords + break: class { +>break : Symbol(break, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 6, 6)) + + constructor() { } + }, + case: class { +>case : Symbol(case, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 11, 6)) + + constructor() { } + }, + catch: class { +>catch : Symbol(catch, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 14, 6)) + + constructor() { } + }, + class: class { +>class : Symbol(class, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 17, 6)) + + constructor() { } + }, + const: class { +>const : Symbol(const, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 20, 6)) + + constructor() { } + }, + continue: class { +>continue : Symbol(continue, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 23, 6)) + + constructor() { } + }, + debugger: class { +>debugger : Symbol(debugger, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 26, 6)) + + constructor() { } + }, + default: class { +>default : Symbol(default, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 29, 6)) + + constructor() { } + }, + delete: class { +>delete : Symbol(delete, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 32, 6)) + + constructor() { } + }, + do: class { +>do : Symbol(do, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 35, 6)) + + constructor() { } + }, + else: class { +>else : Symbol(else, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 38, 6)) + + constructor() { } + }, + enum: class { +>enum : Symbol(enum, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 41, 6)) + + constructor() { } + }, + export: class { +>export : Symbol(export, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 44, 6)) + + constructor() { } + }, + extends: class { +>extends : Symbol(extends, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 47, 6)) + + constructor() { } + }, + false: class { +>false : Symbol(false, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 50, 6)) + + constructor() { } + }, + finally: class { +>finally : Symbol(finally, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 53, 6)) + + constructor() { } + }, + for: class { +>for : Symbol(for, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 56, 6)) + + constructor() { } + }, + function: class { +>function : Symbol(function, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 59, 6)) + + constructor() { } + }, + if: class { +>if : Symbol(if, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 62, 6)) + + constructor() { } + }, + import: class { +>import : Symbol(import, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 65, 6)) + + constructor() { } + }, + in: class { +>in : Symbol(in, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 68, 6)) + + constructor() { } + }, + instanceof: class { +>instanceof : Symbol(instanceof, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 71, 6)) + + constructor() { } + }, + new: class { +>new : Symbol(new, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 74, 6)) + + constructor() { } + }, + null: class { +>null : Symbol(null, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 77, 6)) + + constructor() { } + }, + return: class { +>return : Symbol(return, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 80, 6)) + + constructor() { } + }, + super: class { +>super : Symbol(super, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 83, 6)) + + constructor() { } + }, + switch: class { +>switch : Symbol(switch, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 86, 6)) + + constructor() { } + }, + this: class { +>this : Symbol(this, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 89, 6)) + + constructor() { } + }, + throw: class { +>throw : Symbol(throw, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 92, 6)) + + constructor() { } + }, + true: class { +>true : Symbol(true, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 95, 6)) + + constructor() { } + }, + try: class { +>try : Symbol(try, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 98, 6)) + + constructor() { } + }, + typeof: class { +>typeof : Symbol(typeof, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 101, 6)) + + constructor() { } + }, + var: class { +>var : Symbol(var, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 104, 6)) + + constructor() { } + }, + void: class { +>void : Symbol(void, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 107, 6)) + + constructor() { } + }, + while: class { +>while : Symbol(while, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 110, 6)) + + constructor() { } + }, + with: class { +>with : Symbol(with, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 113, 6)) + + constructor() { } + }, + implements: class { +>implements : Symbol(implements, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 116, 6)) + + constructor() { } + }, + interface: class { +>interface : Symbol(interface, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 119, 6)) + + constructor() { } + }, + let: class { +>let : Symbol(let, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 122, 6)) + + constructor() { } + }, + package: class { +>package : Symbol(package, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 125, 6)) + + constructor() { } + }, + private: class { +>private : Symbol(private, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 128, 6)) + + constructor() { } + }, + protected: class { +>protected : Symbol(protected, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 131, 6)) + + constructor() { } + }, + public: class { +>public : Symbol(public, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 134, 6)) + + constructor() { } + }, + static: class { +>static : Symbol(static, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 137, 6)) + + constructor() { } + }, + yield: class { +>yield : Symbol(yield, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 140, 6)) + + constructor() { } + }, + abstract: class { +>abstract : Symbol(abstract, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 143, 6)) + + constructor() { } + }, + as: class { +>as : Symbol(as, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 146, 6)) + + constructor() { } + }, + asserts: class { +>asserts : Symbol(asserts, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 149, 6)) + + constructor() { } + }, + any: class { +>any : Symbol(any, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 152, 6)) + + constructor() { } + }, + async: class { +>async : Symbol(async, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 155, 6)) + + constructor() { } + }, + await: class { +>await : Symbol(await, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 158, 6)) + + constructor() { } + }, + boolean: class { +>boolean : Symbol(boolean, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 161, 6)) + + constructor() { } + }, + constructor: class { +>constructor : Symbol(constructor, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 164, 6)) + + constructor() { } + }, + declare: class { +>declare : Symbol(declare, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 167, 6)) + + constructor() { } + }, + get: class { +>get : Symbol(get, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 170, 6)) + + constructor() { } + }, + infer: class { +>infer : Symbol(infer, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 173, 6)) + + constructor() { } + }, + is: class { +>is : Symbol(is, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 176, 6)) + + constructor() { } + }, + keyof: class { +>keyof : Symbol(keyof, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 179, 6)) + + constructor() { } + }, + module: class { +>module : Symbol(module, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 182, 6)) + + constructor() { } + }, + namespace: class { +>namespace : Symbol(namespace, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 185, 6)) + + constructor() { } + }, + never: class { +>never : Symbol(never, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 188, 6)) + + constructor() { } + }, + readonly: class { +>readonly : Symbol(readonly, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 191, 6)) + + constructor() { } + }, + require: class { +>require : Symbol(require, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 194, 6)) + + constructor() { } + }, + number: class { +>number : Symbol(number, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 197, 6)) + + constructor() { } + }, + object: class { +>object : Symbol(object, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 200, 6)) + + constructor() { } + }, + set: class { +>set : Symbol(set, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 203, 6)) + + constructor() { } + }, + string: class { +>string : Symbol(string, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 206, 6)) + + constructor() { } + }, + symbol: class { +>symbol : Symbol(symbol, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 209, 6)) + + constructor() { } + }, + type: class { +>type : Symbol(type, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 212, 6)) + + constructor() { } + }, + undefined: class { +>undefined : Symbol(undefined, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 215, 6)) + + constructor() { } + }, + unique: class { +>unique : Symbol(unique, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 218, 6)) + + constructor() { } + }, + unknown: class { +>unknown : Symbol(unknown, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 221, 6)) + + constructor() { } + }, + from: class { +>from : Symbol(from, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 224, 6)) + + constructor() { } + }, + global: class { +>global : Symbol(global, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 227, 6)) + + constructor() { } + }, + bigint: class { +>bigint : Symbol(bigint, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 230, 6)) + + constructor() { } + }, + of: class { +>of : Symbol(of, Decl(convertClassExpressionToFunctionFromObjectProperty2.ts, 233, 6)) + + constructor() { } + } +}) + diff --git a/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty2.types b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty2.types new file mode 100644 index 00000000000..a0a8cc70109 --- /dev/null +++ b/tests/baselines/reference/convertClassExpressionToFunctionFromObjectProperty2.types @@ -0,0 +1,477 @@ +=== tests/cases/compiler/convertClassExpressionToFunctionFromObjectProperty2.ts === +({ +>({ x: class { constructor() { } }, y: class { constructor() { } }, // keywords break: class { constructor() { } }, case: class { constructor() { } }, catch: class { constructor() { } }, class: class { constructor() { } }, const: class { constructor() { } }, continue: class { constructor() { } }, debugger: class { constructor() { } }, default: class { constructor() { } }, delete: class { constructor() { } }, do: class { constructor() { } }, else: class { constructor() { } }, enum: class { constructor() { } }, export: class { constructor() { } }, extends: class { constructor() { } }, false: class { constructor() { } }, finally: class { constructor() { } }, for: class { constructor() { } }, function: class { constructor() { } }, if: class { constructor() { } }, import: class { constructor() { } }, in: class { constructor() { } }, instanceof: class { constructor() { } }, new: class { constructor() { } }, null: class { constructor() { } }, return: class { constructor() { } }, super: class { constructor() { } }, switch: class { constructor() { } }, this: class { constructor() { } }, throw: class { constructor() { } }, true: class { constructor() { } }, try: class { constructor() { } }, typeof: class { constructor() { } }, var: class { constructor() { } }, void: class { constructor() { } }, while: class { constructor() { } }, with: class { constructor() { } }, implements: class { constructor() { } }, interface: class { constructor() { } }, let: class { constructor() { } }, package: class { constructor() { } }, private: class { constructor() { } }, protected: class { constructor() { } }, public: class { constructor() { } }, static: class { constructor() { } }, yield: class { constructor() { } }, abstract: class { constructor() { } }, as: class { constructor() { } }, asserts: class { constructor() { } }, any: class { constructor() { } }, async: class { constructor() { } }, await: class { constructor() { } }, boolean: class { constructor() { } }, constructor: class { constructor() { } }, declare: class { constructor() { } }, get: class { constructor() { } }, infer: class { constructor() { } }, is: class { constructor() { } }, keyof: class { constructor() { } }, module: class { constructor() { } }, namespace: class { constructor() { } }, never: class { constructor() { } }, readonly: class { constructor() { } }, require: class { constructor() { } }, number: class { constructor() { } }, object: class { constructor() { } }, set: class { constructor() { } }, string: class { constructor() { } }, symbol: class { constructor() { } }, type: class { constructor() { } }, undefined: class { constructor() { } }, unique: class { constructor() { } }, unknown: class { constructor() { } }, from: class { constructor() { } }, global: class { constructor() { } }, bigint: class { constructor() { } }, of: class { constructor() { } }}) : { x: typeof x; y: typeof y; break: typeof break; case: typeof case; catch: typeof catch; class: typeof class; const: typeof const; continue: typeof continue; debugger: typeof debugger; default: typeof default; delete: typeof delete; do: typeof do; else: typeof else; enum: typeof enum; export: typeof export; extends: typeof extends; false: typeof false; finally: typeof finally; for: typeof for; function: typeof function; if: typeof if; import: typeof import; in: typeof in; instanceof: typeof instanceof; new: typeof new; null: typeof null; return: typeof return; super: typeof super; switch: typeof switch; this: typeof this; throw: typeof throw; true: typeof true; try: typeof try; typeof: typeof typeof; var: typeof var; void: typeof void; while: typeof while; with: typeof with; implements: typeof implements; interface: typeof interface; let: typeof let; package: typeof package; private: typeof private; protected: typeof protected; public: typeof public; static: typeof static; yield: typeof yield; abstract: typeof abstract; as: typeof as; asserts: typeof asserts; any: typeof any; async: typeof async; await: typeof await; boolean: typeof boolean; constructor: typeof constructor; declare: typeof declare; get: typeof get; infer: typeof infer; is: typeof is; keyof: typeof keyof; module: typeof module; namespace: typeof namespace; never: typeof never; readonly: typeof readonly; require: typeof require; number: typeof number; object: typeof object; set: typeof set; string: typeof string; symbol: typeof symbol; type: typeof type; undefined: typeof undefined; unique: typeof unique; unknown: typeof unknown; from: typeof from; global: typeof global; bigint: typeof bigint; of: typeof of; } +>{ x: class { constructor() { } }, y: class { constructor() { } }, // keywords break: class { constructor() { } }, case: class { constructor() { } }, catch: class { constructor() { } }, class: class { constructor() { } }, const: class { constructor() { } }, continue: class { constructor() { } }, debugger: class { constructor() { } }, default: class { constructor() { } }, delete: class { constructor() { } }, do: class { constructor() { } }, else: class { constructor() { } }, enum: class { constructor() { } }, export: class { constructor() { } }, extends: class { constructor() { } }, false: class { constructor() { } }, finally: class { constructor() { } }, for: class { constructor() { } }, function: class { constructor() { } }, if: class { constructor() { } }, import: class { constructor() { } }, in: class { constructor() { } }, instanceof: class { constructor() { } }, new: class { constructor() { } }, null: class { constructor() { } }, return: class { constructor() { } }, super: class { constructor() { } }, switch: class { constructor() { } }, this: class { constructor() { } }, throw: class { constructor() { } }, true: class { constructor() { } }, try: class { constructor() { } }, typeof: class { constructor() { } }, var: class { constructor() { } }, void: class { constructor() { } }, while: class { constructor() { } }, with: class { constructor() { } }, implements: class { constructor() { } }, interface: class { constructor() { } }, let: class { constructor() { } }, package: class { constructor() { } }, private: class { constructor() { } }, protected: class { constructor() { } }, public: class { constructor() { } }, static: class { constructor() { } }, yield: class { constructor() { } }, abstract: class { constructor() { } }, as: class { constructor() { } }, asserts: class { constructor() { } }, any: class { constructor() { } }, async: class { constructor() { } }, await: class { constructor() { } }, boolean: class { constructor() { } }, constructor: class { constructor() { } }, declare: class { constructor() { } }, get: class { constructor() { } }, infer: class { constructor() { } }, is: class { constructor() { } }, keyof: class { constructor() { } }, module: class { constructor() { } }, namespace: class { constructor() { } }, never: class { constructor() { } }, readonly: class { constructor() { } }, require: class { constructor() { } }, number: class { constructor() { } }, object: class { constructor() { } }, set: class { constructor() { } }, string: class { constructor() { } }, symbol: class { constructor() { } }, type: class { constructor() { } }, undefined: class { constructor() { } }, unique: class { constructor() { } }, unknown: class { constructor() { } }, from: class { constructor() { } }, global: class { constructor() { } }, bigint: class { constructor() { } }, of: class { constructor() { } }} : { x: typeof x; y: typeof y; break: typeof break; case: typeof case; catch: typeof catch; class: typeof class; const: typeof const; continue: typeof continue; debugger: typeof debugger; default: typeof default; delete: typeof delete; do: typeof do; else: typeof else; enum: typeof enum; export: typeof export; extends: typeof extends; false: typeof false; finally: typeof finally; for: typeof for; function: typeof function; if: typeof if; import: typeof import; in: typeof in; instanceof: typeof instanceof; new: typeof new; null: typeof null; return: typeof return; super: typeof super; switch: typeof switch; this: typeof this; throw: typeof throw; true: typeof true; try: typeof try; typeof: typeof typeof; var: typeof var; void: typeof void; while: typeof while; with: typeof with; implements: typeof implements; interface: typeof interface; let: typeof let; package: typeof package; private: typeof private; protected: typeof protected; public: typeof public; static: typeof static; yield: typeof yield; abstract: typeof abstract; as: typeof as; asserts: typeof asserts; any: typeof any; async: typeof async; await: typeof await; boolean: typeof boolean; constructor: typeof constructor; declare: typeof declare; get: typeof get; infer: typeof infer; is: typeof is; keyof: typeof keyof; module: typeof module; namespace: typeof namespace; never: typeof never; readonly: typeof readonly; require: typeof require; number: typeof number; object: typeof object; set: typeof set; string: typeof string; symbol: typeof symbol; type: typeof type; undefined: typeof undefined; unique: typeof unique; unknown: typeof unknown; from: typeof from; global: typeof global; bigint: typeof bigint; of: typeof of; } + + x: class { +>x : typeof x +>class { constructor() { } } : typeof x + + constructor() { } + }, + y: class { +>y : typeof y +>class { constructor() { } } : typeof y + + constructor() { } + }, + + // keywords + break: class { +>break : typeof break +>class { constructor() { } } : typeof break + + constructor() { } + }, + case: class { +>case : typeof case +>class { constructor() { } } : typeof case + + constructor() { } + }, + catch: class { +>catch : typeof catch +>class { constructor() { } } : typeof catch + + constructor() { } + }, + class: class { +>class : typeof class +>class { constructor() { } } : typeof class + + constructor() { } + }, + const: class { +>const : typeof const +>class { constructor() { } } : typeof const + + constructor() { } + }, + continue: class { +>continue : typeof continue +>class { constructor() { } } : typeof continue + + constructor() { } + }, + debugger: class { +>debugger : typeof debugger +>class { constructor() { } } : typeof debugger + + constructor() { } + }, + default: class { +>default : typeof default +>class { constructor() { } } : typeof default + + constructor() { } + }, + delete: class { +>delete : typeof delete +>class { constructor() { } } : typeof delete + + constructor() { } + }, + do: class { +>do : typeof do +>class { constructor() { } } : typeof do + + constructor() { } + }, + else: class { +>else : typeof else +>class { constructor() { } } : typeof else + + constructor() { } + }, + enum: class { +>enum : typeof enum +>class { constructor() { } } : typeof enum + + constructor() { } + }, + export: class { +>export : typeof export +>class { constructor() { } } : typeof export + + constructor() { } + }, + extends: class { +>extends : typeof extends +>class { constructor() { } } : typeof extends + + constructor() { } + }, + false: class { +>false : typeof false +>class { constructor() { } } : typeof false + + constructor() { } + }, + finally: class { +>finally : typeof finally +>class { constructor() { } } : typeof finally + + constructor() { } + }, + for: class { +>for : typeof for +>class { constructor() { } } : typeof for + + constructor() { } + }, + function: class { +>function : typeof function +>class { constructor() { } } : typeof function + + constructor() { } + }, + if: class { +>if : typeof if +>class { constructor() { } } : typeof if + + constructor() { } + }, + import: class { +>import : typeof import +>class { constructor() { } } : typeof import + + constructor() { } + }, + in: class { +>in : typeof in +>class { constructor() { } } : typeof in + + constructor() { } + }, + instanceof: class { +>instanceof : typeof instanceof +>class { constructor() { } } : typeof instanceof + + constructor() { } + }, + new: class { +>new : typeof new +>class { constructor() { } } : typeof new + + constructor() { } + }, + null: class { +>null : typeof null +>class { constructor() { } } : typeof null + + constructor() { } + }, + return: class { +>return : typeof return +>class { constructor() { } } : typeof return + + constructor() { } + }, + super: class { +>super : typeof super +>class { constructor() { } } : typeof super + + constructor() { } + }, + switch: class { +>switch : typeof switch +>class { constructor() { } } : typeof switch + + constructor() { } + }, + this: class { +>this : typeof this +>class { constructor() { } } : typeof this + + constructor() { } + }, + throw: class { +>throw : typeof throw +>class { constructor() { } } : typeof throw + + constructor() { } + }, + true: class { +>true : typeof true +>class { constructor() { } } : typeof true + + constructor() { } + }, + try: class { +>try : typeof try +>class { constructor() { } } : typeof try + + constructor() { } + }, + typeof: class { +>typeof : typeof typeof +>class { constructor() { } } : typeof typeof + + constructor() { } + }, + var: class { +>var : typeof var +>class { constructor() { } } : typeof var + + constructor() { } + }, + void: class { +>void : typeof void +>class { constructor() { } } : typeof void + + constructor() { } + }, + while: class { +>while : typeof while +>class { constructor() { } } : typeof while + + constructor() { } + }, + with: class { +>with : typeof with +>class { constructor() { } } : typeof with + + constructor() { } + }, + implements: class { +>implements : typeof implements +>class { constructor() { } } : typeof implements + + constructor() { } + }, + interface: class { +>interface : typeof interface +>class { constructor() { } } : typeof interface + + constructor() { } + }, + let: class { +>let : typeof let +>class { constructor() { } } : typeof let + + constructor() { } + }, + package: class { +>package : typeof package +>class { constructor() { } } : typeof package + + constructor() { } + }, + private: class { +>private : typeof private +>class { constructor() { } } : typeof private + + constructor() { } + }, + protected: class { +>protected : typeof protected +>class { constructor() { } } : typeof protected + + constructor() { } + }, + public: class { +>public : typeof public +>class { constructor() { } } : typeof public + + constructor() { } + }, + static: class { +>static : typeof static +>class { constructor() { } } : typeof static + + constructor() { } + }, + yield: class { +>yield : typeof yield +>class { constructor() { } } : typeof yield + + constructor() { } + }, + abstract: class { +>abstract : typeof abstract +>class { constructor() { } } : typeof abstract + + constructor() { } + }, + as: class { +>as : typeof as +>class { constructor() { } } : typeof as + + constructor() { } + }, + asserts: class { +>asserts : typeof asserts +>class { constructor() { } } : typeof asserts + + constructor() { } + }, + any: class { +>any : typeof any +>class { constructor() { } } : typeof any + + constructor() { } + }, + async: class { +>async : typeof async +>class { constructor() { } } : typeof async + + constructor() { } + }, + await: class { +>await : typeof await +>class { constructor() { } } : typeof await + + constructor() { } + }, + boolean: class { +>boolean : typeof boolean +>class { constructor() { } } : typeof boolean + + constructor() { } + }, + constructor: class { +>constructor : typeof constructor +>class { constructor() { } } : typeof constructor + + constructor() { } + }, + declare: class { +>declare : typeof declare +>class { constructor() { } } : typeof declare + + constructor() { } + }, + get: class { +>get : typeof get +>class { constructor() { } } : typeof get + + constructor() { } + }, + infer: class { +>infer : typeof infer +>class { constructor() { } } : typeof infer + + constructor() { } + }, + is: class { +>is : typeof is +>class { constructor() { } } : typeof is + + constructor() { } + }, + keyof: class { +>keyof : typeof keyof +>class { constructor() { } } : typeof keyof + + constructor() { } + }, + module: class { +>module : typeof module +>class { constructor() { } } : typeof module + + constructor() { } + }, + namespace: class { +>namespace : typeof namespace +>class { constructor() { } } : typeof namespace + + constructor() { } + }, + never: class { +>never : typeof never +>class { constructor() { } } : typeof never + + constructor() { } + }, + readonly: class { +>readonly : typeof readonly +>class { constructor() { } } : typeof readonly + + constructor() { } + }, + require: class { +>require : typeof require +>class { constructor() { } } : typeof require + + constructor() { } + }, + number: class { +>number : typeof number +>class { constructor() { } } : typeof number + + constructor() { } + }, + object: class { +>object : typeof object +>class { constructor() { } } : typeof object + + constructor() { } + }, + set: class { +>set : typeof set +>class { constructor() { } } : typeof set + + constructor() { } + }, + string: class { +>string : typeof string +>class { constructor() { } } : typeof string + + constructor() { } + }, + symbol: class { +>symbol : typeof symbol +>class { constructor() { } } : typeof symbol + + constructor() { } + }, + type: class { +>type : typeof type +>class { constructor() { } } : typeof type + + constructor() { } + }, + undefined: class { +>undefined : typeof undefined +>class { constructor() { } } : typeof undefined + + constructor() { } + }, + unique: class { +>unique : typeof unique +>class { constructor() { } } : typeof unique + + constructor() { } + }, + unknown: class { +>unknown : typeof unknown +>class { constructor() { } } : typeof unknown + + constructor() { } + }, + from: class { +>from : typeof from +>class { constructor() { } } : typeof from + + constructor() { } + }, + global: class { +>global : typeof global +>class { constructor() { } } : typeof global + + constructor() { } + }, + bigint: class { +>bigint : typeof bigint +>class { constructor() { } } : typeof bigint + + constructor() { } + }, + of: class { +>of : typeof of +>class { constructor() { } } : typeof of + + constructor() { } + } +}) + diff --git a/tests/baselines/reference/convertKeywordsYes.js b/tests/baselines/reference/convertKeywordsYes.js index 4605db05c6c..c05cd3301d5 100644 --- a/tests/baselines/reference/convertKeywordsYes.js +++ b/tests/baselines/reference/convertKeywordsYes.js @@ -506,19 +506,19 @@ var bigModule; return constructor; }()); var implements = /** @class */ (function () { - function implements() { + function implements_1() { } - return implements; + return implements_1; }()); var interface = /** @class */ (function () { - function interface() { + function interface_1() { } - return interface; + return interface_1; }()); var let = /** @class */ (function () { - function let() { + function let_1() { } - return let; + return let_1; }()); var module = /** @class */ (function () { function module() { @@ -526,24 +526,24 @@ var bigModule; return module; }()); var package = /** @class */ (function () { - function package() { + function package_1() { } - return package; + return package_1; }()); var private = /** @class */ (function () { - function private() { + function private_1() { } - return private; + return private_1; }()); var protected = /** @class */ (function () { - function protected() { + function protected_1() { } - return protected; + return protected_1; }()); var public = /** @class */ (function () { - function public() { + function public_1() { } - return public; + return public_1; }()); var set = /** @class */ (function () { function set() { @@ -551,9 +551,9 @@ var bigModule; return set; }()); var static = /** @class */ (function () { - function static() { + function static_1() { } - return static; + return static_1; }()); var get = /** @class */ (function () { function get() { @@ -561,9 +561,9 @@ var bigModule; return get; }()); var yield = /** @class */ (function () { - function yield() { + function yield_1() { } - return yield; + return yield_1; }()); var declare = /** @class */ (function () { function declare() { diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen.ts b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen1.js similarity index 79% rename from tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen.ts rename to tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen1.js index 8b4b5afd88c..3dea02ec3b1 100644 --- a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen.ts +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen1.js @@ -12,7 +12,7 @@ function /*[#|*/f/*|]*/() { async function f() { await Promise.resolve(); - return Promise.all([fetch("https://typescriptlang.org"), fetch("https://microsoft.com"), Promise.resolve().then(function() { + return await Promise.all([fetch("https://typescriptlang.org"), fetch("https://microsoft.com"), Promise.resolve().then(function() { return fetch("https://github.com"); }).then(res => res.toString())]); } diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen.js b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen1.ts similarity index 79% rename from tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen.js rename to tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen1.ts index 8b4b5afd88c..3dea02ec3b1 100644 --- a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen.js +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen1.ts @@ -12,7 +12,7 @@ function /*[#|*/f/*|]*/() { async function f() { await Promise.resolve(); - return Promise.all([fetch("https://typescriptlang.org"), fetch("https://microsoft.com"), Promise.resolve().then(function() { + return await Promise.all([fetch("https://typescriptlang.org"), fetch("https://microsoft.com"), Promise.resolve().then(function() { return fetch("https://github.com"); }).then(res => res.toString())]); } diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen3.js b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen3.js new file mode 100644 index 00000000000..5219dc7358c --- /dev/null +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen3.js @@ -0,0 +1,17 @@ +// ==ORIGINAL== + +function /*[#|*/f/*|]*/() { + return Promise.resolve().then(() => + Promise.all([fetch("https://typescriptlang.org"), fetch("https://microsoft.com"), Promise.resolve().then(function () { + return fetch("https://github.com"); + }).then(res => res.toString())])); +} + +// ==ASYNC FUNCTION::Convert to async function== + +async function f() { + await Promise.resolve(); + return await Promise.all([fetch("https://typescriptlang.org"), fetch("https://microsoft.com"), Promise.resolve().then(function() { + return fetch("https://github.com"); + }).then(res => res.toString())]); +} diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen3.ts b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen3.ts new file mode 100644 index 00000000000..5219dc7358c --- /dev/null +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen3.ts @@ -0,0 +1,17 @@ +// ==ORIGINAL== + +function /*[#|*/f/*|]*/() { + return Promise.resolve().then(() => + Promise.all([fetch("https://typescriptlang.org"), fetch("https://microsoft.com"), Promise.resolve().then(function () { + return fetch("https://github.com"); + }).then(res => res.toString())])); +} + +// ==ASYNC FUNCTION::Convert to async function== + +async function f() { + await Promise.resolve(); + return await Promise.all([fetch("https://typescriptlang.org"), fetch("https://microsoft.com"), Promise.resolve().then(function() { + return fetch("https://github.com"); + }).then(res => res.toString())]); +} diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen4.js b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen4.js new file mode 100644 index 00000000000..f3be8d3479c --- /dev/null +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen4.js @@ -0,0 +1,18 @@ +// ==ORIGINAL== + +function /*[#|*/f/*|]*/() { + return Promise.resolve().then(() => + Promise.all([fetch("https://typescriptlang.org"), fetch("https://microsoft.com"), Promise.resolve().then(function () { + return fetch("https://github.com"); + })]).then(res => res.toString())); +} + +// ==ASYNC FUNCTION::Convert to async function== + +async function f() { + await Promise.resolve(); + const res = await Promise.all([fetch("https://typescriptlang.org"), fetch("https://microsoft.com"), Promise.resolve().then(function() { + return fetch("https://github.com"); + })]); + return res.toString(); +} diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen4.ts b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen4.ts new file mode 100644 index 00000000000..f3be8d3479c --- /dev/null +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_PromiseAllAndThen4.ts @@ -0,0 +1,18 @@ +// ==ORIGINAL== + +function /*[#|*/f/*|]*/() { + return Promise.resolve().then(() => + Promise.all([fetch("https://typescriptlang.org"), fetch("https://microsoft.com"), Promise.resolve().then(function () { + return fetch("https://github.com"); + })]).then(res => res.toString())); +} + +// ==ASYNC FUNCTION::Convert to async function== + +async function f() { + await Promise.resolve(); + const res = await Promise.all([fetch("https://typescriptlang.org"), fetch("https://microsoft.com"), Promise.resolve().then(function() { + return fetch("https://github.com"); + })]); + return res.toString(); +} diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_Return1.ts b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_Return1.ts new file mode 100644 index 00000000000..75e1d23902e --- /dev/null +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_Return1.ts @@ -0,0 +1,16 @@ +// ==ORIGINAL== + +function /*[#|*/f/*|]*/(p: Promise) { + return p.catch((error: Error) => { + return Promise.reject(error); + }); +} +// ==ASYNC FUNCTION::Convert to async function== + +async function f(p: Promise) { + try { + return p; + } catch (error) { + return await Promise.reject(error); + } +} \ No newline at end of file diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_Return2.ts b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_Return2.ts new file mode 100644 index 00000000000..01fea0275c6 --- /dev/null +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_Return2.ts @@ -0,0 +1,14 @@ +// ==ORIGINAL== + +function /*[#|*/f/*|]*/(p: Promise) { + return p.catch((error: Error) => Promise.reject(error)); +} +// ==ASYNC FUNCTION::Convert to async function== + +async function f(p: Promise) { + try { + return p; + } catch (error) { + return await Promise.reject(error); + } +} \ No newline at end of file diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_Return3.ts b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_Return3.ts new file mode 100644 index 00000000000..43cbe7e36b4 --- /dev/null +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_Return3.ts @@ -0,0 +1,16 @@ +// ==ORIGINAL== + +function /*[#|*/f/*|]*/(p: Promise) { + return p.catch(function (error: Error) { + return Promise.reject(error); + }); +} +// ==ASYNC FUNCTION::Convert to async function== + +async function f(p: Promise) { + try { + return p; + } catch (error) { + return await Promise.reject(error); + } +} \ No newline at end of file diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_callbackArgument.ts b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_callbackArgument.ts new file mode 100644 index 00000000000..7f46b8f564a --- /dev/null +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_callbackArgument.ts @@ -0,0 +1,26 @@ +// ==ORIGINAL== + +function foo(props: any): void { + return props; +} + +const fn = (): Promise<(message: string) => void> => + new Promise(resolve => resolve((message: string) => foo(message))); + +function /*[#|*/f/*|]*/() { + return fn().then(res => res("test")); +} + +// ==ASYNC FUNCTION::Convert to async function== + +function foo(props: any): void { + return props; +} + +const fn = (): Promise<(message: string) => void> => + new Promise(resolve => resolve((message: string) => foo(message))); + +async function f() { + const res = await fn(); + return res("test"); +} diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_noArgs.ts b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_noArgs1.ts similarity index 93% rename from tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_noArgs.ts rename to tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_noArgs1.ts index 088bf9f828e..d5be5a9f054 100644 --- a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_noArgs.ts +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_noArgs1.ts @@ -11,7 +11,7 @@ function /*[#|*/main2/*|]*/() { .then(() => { console.log("."); return delay(500); }) .then(() => { console.log("."); return delay(500); }) } - + // ==ASYNC FUNCTION::Convert to async function== function delay(millis: number): Promise { @@ -26,5 +26,6 @@ async function main2() { console.log("."); await delay(500); console.log("."); - return delay(500); + return await delay(500); } + \ No newline at end of file diff --git a/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_noArgs2.ts b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_noArgs2.ts new file mode 100644 index 00000000000..04f75d9d78f --- /dev/null +++ b/tests/baselines/reference/convertToAsyncFunction/convertToAsyncFunction_noArgs2.ts @@ -0,0 +1,28 @@ +// ==ORIGINAL== + +function delay(millis: number): Promise { + throw "no" +} + +function /*[#|*/main2/*|]*/() { + console.log("Please wait. Loading."); + return delay(500) + .then(() => delay(500)) + .then(() => delay(500)) + .then(() => delay(500)) +} + +// ==ASYNC FUNCTION::Convert to async function== + +function delay(millis: number): Promise { + throw "no" +} + +async function main2() { + console.log("Please wait. Loading."); + await delay(500); + await delay(500); + await delay(500); + return await delay(500); +} + \ No newline at end of file diff --git a/tests/baselines/reference/copyrightWithNewLine1.errors.txt b/tests/baselines/reference/copyrightWithNewLine1.errors.txt index 21c19c41741..ede8c3c9bdd 100644 --- a/tests/baselines/reference/copyrightWithNewLine1.errors.txt +++ b/tests/baselines/reference/copyrightWithNewLine1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2307: Cannot find module './greeter' or its corresponding type declarations. +tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2792: Cannot find module './greeter'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/copyrightWithNewLine1.ts (1 errors) ==== @@ -8,7 +8,7 @@ tests/cases/compiler/copyrightWithNewLine1.ts(5,24): error TS2307: Cannot find m import model = require("./greeter") ~~~~~~~~~~~ -!!! error TS2307: Cannot find module './greeter' or its corresponding type declarations. +!!! error TS2792: Cannot find module './greeter'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? var el = document.getElementById('content'); var greeter = new model.Greeter(el); /** things */ diff --git a/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt b/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt index 51bc7422286..4777bf7dea3 100644 --- a/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt +++ b/tests/baselines/reference/copyrightWithoutNewLine1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2307: Cannot find module './greeter' or its corresponding type declarations. +tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2792: Cannot find module './greeter'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/copyrightWithoutNewLine1.ts (1 errors) ==== @@ -7,7 +7,7 @@ tests/cases/compiler/copyrightWithoutNewLine1.ts(4,24): error TS2307: Cannot fin ****************************/ import model = require("./greeter") ~~~~~~~~~~~ -!!! error TS2307: Cannot find module './greeter' or its corresponding type declarations. +!!! error TS2792: Cannot find module './greeter'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? var el = document.getElementById('content'); var greeter = new model.Greeter(el); /** things */ diff --git a/tests/baselines/reference/declarationEmitAliasExportStar.js b/tests/baselines/reference/declarationEmitAliasExportStar.js index ee06b84b16b..450e1b15fa0 100644 --- a/tests/baselines/reference/declarationEmitAliasExportStar.js +++ b/tests/baselines/reference/declarationEmitAliasExportStar.js @@ -30,7 +30,8 @@ __exportStar(require("./thingB"), exports); "use strict"; exports.__esModule = true; exports.thing2 = void 0; -exports.thing2 = function (param) { return null; }; +var thing2 = function (param) { return null; }; +exports.thing2 = thing2; //// [thingB.d.ts] diff --git a/tests/baselines/reference/declarationEmitBundleWithAmbientReferences.js b/tests/baselines/reference/declarationEmitBundleWithAmbientReferences.js index 2088dc2c18d..d9fea42528b 100644 --- a/tests/baselines/reference/declarationEmitBundleWithAmbientReferences.js +++ b/tests/baselines/reference/declarationEmitBundleWithAmbientReferences.js @@ -29,9 +29,10 @@ define("conditional_directive_field", ["require", "exports"], function (require, "use strict"; exports.__esModule = true; exports.build = void 0; - exports.build = function () { + var build = function () { return null; }; + exports.build = build; }); diff --git a/tests/baselines/reference/declarationEmitComputedNameCausesImportToBePainted.js b/tests/baselines/reference/declarationEmitComputedNameCausesImportToBePainted.js index e8e5824bd36..ec0c6ffe2ec 100644 --- a/tests/baselines/reference/declarationEmitComputedNameCausesImportToBePainted.js +++ b/tests/baselines/reference/declarationEmitComputedNameCausesImportToBePainted.js @@ -28,10 +28,11 @@ var context_1 = require("./context"); exports.context = (_a = {}, _a[context_1.Key] = 'bar', _a); -exports.withContext = function (_a) { +var withContext = function (_a) { var _b = context_1.Key, value = _a[_b]; return value; }; +exports.withContext = withContext; //// [context.d.ts] diff --git a/tests/baselines/reference/declarationEmitExpandoWithGenericConstraint.js b/tests/baselines/reference/declarationEmitExpandoWithGenericConstraint.js index d875a2d26b6..b446a577964 100644 --- a/tests/baselines/reference/declarationEmitExpandoWithGenericConstraint.js +++ b/tests/baselines/reference/declarationEmitExpandoWithGenericConstraint.js @@ -18,8 +18,10 @@ Point.zero = (): Point => Point(0, 0); "use strict"; exports.__esModule = true; exports.Rect = exports.Point = void 0; -exports.Point = function (x, y) { return ({ x: x, y: y }); }; -exports.Rect = function (a, b) { return ({ a: a, b: b }); }; +var Point = function (x, y) { return ({ x: x, y: y }); }; +exports.Point = Point; +var Rect = function (a, b) { return ({ a: a, b: b }); }; +exports.Rect = Rect; exports.Point.zero = function () { return exports.Point(0, 0); }; diff --git a/tests/baselines/reference/declarationEmitExportAliasVisibiilityMarking.js b/tests/baselines/reference/declarationEmitExportAliasVisibiilityMarking.js index c82597ab4cc..4f554c808cf 100644 --- a/tests/baselines/reference/declarationEmitExportAliasVisibiilityMarking.js +++ b/tests/baselines/reference/declarationEmitExportAliasVisibiilityMarking.js @@ -25,7 +25,8 @@ exports["default"] = (function (suit, rank) { return ({ suit: suit, rank: rank } "use strict"; exports.__esModule = true; exports.lazyCard = void 0; -exports.lazyCard = function () { return Promise.resolve().then(function () { return require('./Card'); }).then(function (a) { return a["default"]; }); }; +var lazyCard = function () { return Promise.resolve().then(function () { return require('./Card'); }).then(function (a) { return a["default"]; }); }; +exports.lazyCard = lazyCard; //// [Types.d.ts] diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends6.errors.txt b/tests/baselines/reference/declarationEmitExpressionInExtends6.errors.txt new file mode 100644 index 00000000000..acd1e1a7c9e --- /dev/null +++ b/tests/baselines/reference/declarationEmitExpressionInExtends6.errors.txt @@ -0,0 +1,15 @@ +/b.ts(2,30): error TS4021: 'extends' clause of exported class has or is using private name 'Foo'. + + +==== /b.ts (1 errors) ==== + const { Foo } = require("./a"); + export default class extends Foo {} + ~~~ +!!! error TS4021: 'extends' clause of exported class has or is using private name 'Foo'. + +==== /node_modules/@types/node/index.d.ts (0 errors) ==== + declare const require: any; + +==== /a.js (0 errors) ==== + export class Foo {} + \ No newline at end of file diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends6.js b/tests/baselines/reference/declarationEmitExpressionInExtends6.js new file mode 100644 index 00000000000..21506228d99 --- /dev/null +++ b/tests/baselines/reference/declarationEmitExpressionInExtends6.js @@ -0,0 +1,38 @@ +//// [tests/cases/compiler/declarationEmitExpressionInExtends6.ts] //// + +//// [index.d.ts] +declare const require: any; + +//// [a.js] +export class Foo {} + +//// [b.ts] +const { Foo } = require("./a"); +export default class extends Foo {} + + +//// [b.js] +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +exports.__esModule = true; +var Foo = require("./a").Foo; +var default_1 = /** @class */ (function (_super) { + __extends(default_1, _super); + function default_1() { + return _super !== null && _super.apply(this, arguments) || this; + } + return default_1; +}(Foo)); +exports["default"] = default_1; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends6.symbols b/tests/baselines/reference/declarationEmitExpressionInExtends6.symbols new file mode 100644 index 00000000000..32eaa9018c2 --- /dev/null +++ b/tests/baselines/reference/declarationEmitExpressionInExtends6.symbols @@ -0,0 +1,12 @@ +=== /b.ts === +const { Foo } = require("./a"); +>Foo : Symbol(Foo, Decl(b.ts, 0, 7)) +>require : Symbol(require, Decl(index.d.ts, 0, 13)) + +export default class extends Foo {} +>Foo : Symbol(Foo, Decl(b.ts, 0, 7)) + +=== /node_modules/@types/node/index.d.ts === +declare const require: any; +>require : Symbol(require, Decl(index.d.ts, 0, 13)) + diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends6.types b/tests/baselines/reference/declarationEmitExpressionInExtends6.types new file mode 100644 index 00000000000..03ec99ecc4f --- /dev/null +++ b/tests/baselines/reference/declarationEmitExpressionInExtends6.types @@ -0,0 +1,14 @@ +=== /b.ts === +const { Foo } = require("./a"); +>Foo : any +>require("./a") : any +>require : any +>"./a" : "./a" + +export default class extends Foo {} +>Foo : any + +=== /node_modules/@types/node/index.d.ts === +declare const require: any; +>require : any + diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends7.errors.txt b/tests/baselines/reference/declarationEmitExpressionInExtends7.errors.txt new file mode 100644 index 00000000000..0cfcdc81dfb --- /dev/null +++ b/tests/baselines/reference/declarationEmitExpressionInExtends7.errors.txt @@ -0,0 +1,11 @@ +tests/cases/compiler/declarationEmitExpressionInExtends7.ts(1,30): error TS2304: Cannot find name 'SomeUndefinedFunction'. +tests/cases/compiler/declarationEmitExpressionInExtends7.ts(1,30): error TS4021: 'extends' clause of exported class has or is using private name 'SomeUndefinedFunction'. + + +==== tests/cases/compiler/declarationEmitExpressionInExtends7.ts (2 errors) ==== + export default class extends SomeUndefinedFunction {} + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS2304: Cannot find name 'SomeUndefinedFunction'. + ~~~~~~~~~~~~~~~~~~~~~ +!!! error TS4021: 'extends' clause of exported class has or is using private name 'SomeUndefinedFunction'. + \ No newline at end of file diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends7.js b/tests/baselines/reference/declarationEmitExpressionInExtends7.js new file mode 100644 index 00000000000..ef0809bda84 --- /dev/null +++ b/tests/baselines/reference/declarationEmitExpressionInExtends7.js @@ -0,0 +1,28 @@ +//// [declarationEmitExpressionInExtends7.ts] +export default class extends SomeUndefinedFunction {} + + +//// [declarationEmitExpressionInExtends7.js] +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = function (d, b) { + extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; }; + return extendStatics(d, b); + }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +exports.__esModule = true; +var default_1 = /** @class */ (function (_super) { + __extends(default_1, _super); + function default_1() { + return _super !== null && _super.apply(this, arguments) || this; + } + return default_1; +}(SomeUndefinedFunction)); +exports["default"] = default_1; diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends7.symbols b/tests/baselines/reference/declarationEmitExpressionInExtends7.symbols new file mode 100644 index 00000000000..a81c2cc3871 --- /dev/null +++ b/tests/baselines/reference/declarationEmitExpressionInExtends7.symbols @@ -0,0 +1,4 @@ +=== tests/cases/compiler/declarationEmitExpressionInExtends7.ts === +export default class extends SomeUndefinedFunction {} +No type information for this code. +No type information for this code. \ No newline at end of file diff --git a/tests/baselines/reference/declarationEmitExpressionInExtends7.types b/tests/baselines/reference/declarationEmitExpressionInExtends7.types new file mode 100644 index 00000000000..5a018ac590f --- /dev/null +++ b/tests/baselines/reference/declarationEmitExpressionInExtends7.types @@ -0,0 +1,4 @@ +=== tests/cases/compiler/declarationEmitExpressionInExtends7.ts === +export default class extends SomeUndefinedFunction {} +>SomeUndefinedFunction : any + diff --git a/tests/baselines/reference/declarationEmitOptionalMethod.js b/tests/baselines/reference/declarationEmitOptionalMethod.js index c7e3714010b..14e25fb6ad8 100644 --- a/tests/baselines/reference/declarationEmitOptionalMethod.js +++ b/tests/baselines/reference/declarationEmitOptionalMethod.js @@ -11,7 +11,8 @@ export const Foo = (opts: { "use strict"; exports.__esModule = true; exports.Foo = void 0; -exports.Foo = function (opts) { return ({}); }; +var Foo = function (opts) { return ({}); }; +exports.Foo = Foo; //// [declarationEmitOptionalMethod.d.ts] diff --git a/tests/baselines/reference/declarationEmitRetainsJsdocyComments.js b/tests/baselines/reference/declarationEmitRetainsJsdocyComments.js index b1ec24577b4..f83084cf751 100644 --- a/tests/baselines/reference/declarationEmitRetainsJsdocyComments.js +++ b/tests/baselines/reference/declarationEmitRetainsJsdocyComments.js @@ -52,7 +52,7 @@ exports.someMethod = exports.Foo = exports.foo = void 0; * comment1 * @param p */ -exports.foo = function (p) { +var foo = function (p) { return { /** * comment2 @@ -66,6 +66,7 @@ exports.foo = function (p) { bar2: function (s) { } }; }; +exports.foo = foo; var Foo = /** @class */ (function () { function Foo() { } diff --git a/tests/baselines/reference/declarationEmitShadowingInferNotRenamed.js b/tests/baselines/reference/declarationEmitShadowingInferNotRenamed.js new file mode 100644 index 00000000000..d69903c0413 --- /dev/null +++ b/tests/baselines/reference/declarationEmitShadowingInferNotRenamed.js @@ -0,0 +1,40 @@ +//// [declarationEmitShadowingInferNotRenamed.ts] +// Any instance type +type Client = string + +// Modified instance +type UpdatedClient = C & {foo: number} + +export const createClient = < + D extends + | (new (...args: any[]) => Client) // accept class + | Record Client> // or map of classes +>( + clientDef: D +): D extends new (...args: any[]) => infer C + ? UpdatedClient // return instance + : { + [K in keyof D]: D[K] extends new (...args: any[]) => infer C // or map of instances respectively + ? UpdatedClient + : never + } => { + return null as any +} + +//// [declarationEmitShadowingInferNotRenamed.js] +"use strict"; +exports.__esModule = true; +exports.createClient = void 0; +var createClient = function (clientDef) { + return null; +}; +exports.createClient = createClient; + + +//// [declarationEmitShadowingInferNotRenamed.d.ts] +declare type Client = string; +declare type UpdatedClient = C & { + foo: number; +}; +export declare const createClient: Client> | (new (...args: any[]) => Client)>(clientDef: D) => D extends new (...args: any[]) => infer C ? UpdatedClient : { [K in keyof D]: D[K] extends new (...args: any[]) => infer C_1 ? UpdatedClient : never; }; +export {}; diff --git a/tests/baselines/reference/declarationEmitShadowingInferNotRenamed.symbols b/tests/baselines/reference/declarationEmitShadowingInferNotRenamed.symbols new file mode 100644 index 00000000000..923c839a7bc --- /dev/null +++ b/tests/baselines/reference/declarationEmitShadowingInferNotRenamed.symbols @@ -0,0 +1,58 @@ +=== tests/cases/compiler/declarationEmitShadowingInferNotRenamed.ts === +// Any instance type +type Client = string +>Client : Symbol(Client, Decl(declarationEmitShadowingInferNotRenamed.ts, 0, 0)) + +// Modified instance +type UpdatedClient = C & {foo: number} +>UpdatedClient : Symbol(UpdatedClient, Decl(declarationEmitShadowingInferNotRenamed.ts, 1, 20)) +>C : Symbol(C, Decl(declarationEmitShadowingInferNotRenamed.ts, 4, 19)) +>C : Symbol(C, Decl(declarationEmitShadowingInferNotRenamed.ts, 4, 19)) +>foo : Symbol(foo, Decl(declarationEmitShadowingInferNotRenamed.ts, 4, 29)) + +export const createClient = < +>createClient : Symbol(createClient, Decl(declarationEmitShadowingInferNotRenamed.ts, 6, 12)) + + D extends +>D : Symbol(D, Decl(declarationEmitShadowingInferNotRenamed.ts, 6, 29)) + + | (new (...args: any[]) => Client) // accept class +>args : Symbol(args, Decl(declarationEmitShadowingInferNotRenamed.ts, 8, 12)) +>Client : Symbol(Client, Decl(declarationEmitShadowingInferNotRenamed.ts, 0, 0)) + + | Record Client> // or map of classes +>Record : Symbol(Record, Decl(lib.es5.d.ts, --, --)) +>args : Symbol(args, Decl(declarationEmitShadowingInferNotRenamed.ts, 9, 26)) +>Client : Symbol(Client, Decl(declarationEmitShadowingInferNotRenamed.ts, 0, 0)) + +>( + clientDef: D +>clientDef : Symbol(clientDef, Decl(declarationEmitShadowingInferNotRenamed.ts, 10, 2)) +>D : Symbol(D, Decl(declarationEmitShadowingInferNotRenamed.ts, 6, 29)) + +): D extends new (...args: any[]) => infer C +>D : Symbol(D, Decl(declarationEmitShadowingInferNotRenamed.ts, 6, 29)) +>args : Symbol(args, Decl(declarationEmitShadowingInferNotRenamed.ts, 12, 18)) +>C : Symbol(C, Decl(declarationEmitShadowingInferNotRenamed.ts, 12, 42)) + + ? UpdatedClient // return instance +>UpdatedClient : Symbol(UpdatedClient, Decl(declarationEmitShadowingInferNotRenamed.ts, 1, 20)) +>C : Symbol(C, Decl(declarationEmitShadowingInferNotRenamed.ts, 12, 42)) + + : { + [K in keyof D]: D[K] extends new (...args: any[]) => infer C // or map of instances respectively +>K : Symbol(K, Decl(declarationEmitShadowingInferNotRenamed.ts, 15, 7)) +>D : Symbol(D, Decl(declarationEmitShadowingInferNotRenamed.ts, 6, 29)) +>D : Symbol(D, Decl(declarationEmitShadowingInferNotRenamed.ts, 6, 29)) +>K : Symbol(K, Decl(declarationEmitShadowingInferNotRenamed.ts, 15, 7)) +>args : Symbol(args, Decl(declarationEmitShadowingInferNotRenamed.ts, 15, 40)) +>C : Symbol(C, Decl(declarationEmitShadowingInferNotRenamed.ts, 15, 64)) + + ? UpdatedClient +>UpdatedClient : Symbol(UpdatedClient, Decl(declarationEmitShadowingInferNotRenamed.ts, 1, 20)) +>C : Symbol(C, Decl(declarationEmitShadowingInferNotRenamed.ts, 15, 64)) + + : never + } => { + return null as any +} diff --git a/tests/baselines/reference/declarationEmitShadowingInferNotRenamed.types b/tests/baselines/reference/declarationEmitShadowingInferNotRenamed.types new file mode 100644 index 00000000000..850a5565891 --- /dev/null +++ b/tests/baselines/reference/declarationEmitShadowingInferNotRenamed.types @@ -0,0 +1,40 @@ +=== tests/cases/compiler/declarationEmitShadowingInferNotRenamed.ts === +// Any instance type +type Client = string +>Client : string + +// Modified instance +type UpdatedClient = C & {foo: number} +>UpdatedClient : UpdatedClient +>foo : number + +export const createClient = < +>createClient : Client> | (new (...args: any[]) => Client)>(clientDef: D) => D extends new (...args: any[]) => infer C ? UpdatedClient : { [K in keyof D]: D[K] extends new (...args: any[]) => infer C ? UpdatedClient : never; } +>< D extends | (new (...args: any[]) => Client) // accept class | Record Client> // or map of classes>( clientDef: D): D extends new (...args: any[]) => infer C ? UpdatedClient // return instance : { [K in keyof D]: D[K] extends new (...args: any[]) => infer C // or map of instances respectively ? UpdatedClient : never } => { return null as any} : Client> | (new (...args: any[]) => Client)>(clientDef: D) => D extends new (...args: any[]) => infer C ? UpdatedClient : { [K in keyof D]: D[K] extends new (...args: any[]) => infer C ? UpdatedClient : never; } + + D extends + | (new (...args: any[]) => Client) // accept class +>args : any[] + + | Record Client> // or map of classes +>args : any[] + +>( + clientDef: D +>clientDef : D + +): D extends new (...args: any[]) => infer C +>args : any[] + + ? UpdatedClient // return instance + : { + [K in keyof D]: D[K] extends new (...args: any[]) => infer C // or map of instances respectively +>args : any[] + + ? UpdatedClient + : never + } => { + return null as any +>null as any : any +>null : null +} diff --git a/tests/baselines/reference/declarationEmitTupleRestSignatureLeadingVariadic.js b/tests/baselines/reference/declarationEmitTupleRestSignatureLeadingVariadic.js new file mode 100644 index 00000000000..c0b02f5f5d3 --- /dev/null +++ b/tests/baselines/reference/declarationEmitTupleRestSignatureLeadingVariadic.js @@ -0,0 +1,14 @@ +//// [declarationEmitTupleRestSignatureLeadingVariadic.ts] +const f = (...args: [...TFirstArgs, TLastArg]): void => {}; + +//// [declarationEmitTupleRestSignatureLeadingVariadic.js] +var f = function () { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } +}; + + +//// [declarationEmitTupleRestSignatureLeadingVariadic.d.ts] +declare const f: (...args: [...TFirstArgs, TLastArg]) => void; diff --git a/tests/baselines/reference/declarationEmitTupleRestSignatureLeadingVariadic.symbols b/tests/baselines/reference/declarationEmitTupleRestSignatureLeadingVariadic.symbols new file mode 100644 index 00000000000..b2ab1922ac0 --- /dev/null +++ b/tests/baselines/reference/declarationEmitTupleRestSignatureLeadingVariadic.symbols @@ -0,0 +1,9 @@ +=== tests/cases/compiler/declarationEmitTupleRestSignatureLeadingVariadic.ts === +const f = (...args: [...TFirstArgs, TLastArg]): void => {}; +>f : Symbol(f, Decl(declarationEmitTupleRestSignatureLeadingVariadic.ts, 0, 5)) +>TFirstArgs : Symbol(TFirstArgs, Decl(declarationEmitTupleRestSignatureLeadingVariadic.ts, 0, 11)) +>TLastArg : Symbol(TLastArg, Decl(declarationEmitTupleRestSignatureLeadingVariadic.ts, 0, 36)) +>args : Symbol(args, Decl(declarationEmitTupleRestSignatureLeadingVariadic.ts, 0, 47)) +>TFirstArgs : Symbol(TFirstArgs, Decl(declarationEmitTupleRestSignatureLeadingVariadic.ts, 0, 11)) +>TLastArg : Symbol(TLastArg, Decl(declarationEmitTupleRestSignatureLeadingVariadic.ts, 0, 36)) + diff --git a/tests/baselines/reference/declarationEmitTupleRestSignatureLeadingVariadic.types b/tests/baselines/reference/declarationEmitTupleRestSignatureLeadingVariadic.types new file mode 100644 index 00000000000..a3c9f48ca2d --- /dev/null +++ b/tests/baselines/reference/declarationEmitTupleRestSignatureLeadingVariadic.types @@ -0,0 +1,6 @@ +=== tests/cases/compiler/declarationEmitTupleRestSignatureLeadingVariadic.ts === +const f = (...args: [...TFirstArgs, TLastArg]): void => {}; +>f : (...args: [...TFirstArgs, TLastArg]) => void +>(...args: [...TFirstArgs, TLastArg]): void => {} : (...args: [...TFirstArgs, TLastArg]) => void +>args : [...TFirstArgs, TLastArg] + diff --git a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters1.js b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters1.js index bd0775bb08d..d3dfb39d48d 100644 --- a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters1.js +++ b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters1.js @@ -7,7 +7,8 @@ export const y = (x: Foo) => 1 "use strict"; exports.__esModule = true; exports.y = void 0; -exports.y = function (x) { return 1; }; +var y = function (x) { return 1; }; +exports.y = y; //// [declarationEmitTypeAliasWithTypeParameters1.d.ts] diff --git a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters2.js b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters2.js index 8a967cd592e..750d2d68d06 100644 --- a/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters2.js +++ b/tests/baselines/reference/declarationEmitTypeAliasWithTypeParameters2.js @@ -8,7 +8,8 @@ export const y = (x: Baa) => 1 "use strict"; exports.__esModule = true; exports.y = void 0; -exports.y = function (x) { return 1; }; +var y = function (x) { return 1; }; +exports.y = y; //// [declarationEmitTypeAliasWithTypeParameters2.d.ts] diff --git a/tests/baselines/reference/declarationEmitWithInvalidPackageJsonTypings.js b/tests/baselines/reference/declarationEmitWithInvalidPackageJsonTypings.js index b7badb73fd8..61ca223c575 100644 --- a/tests/baselines/reference/declarationEmitWithInvalidPackageJsonTypings.js +++ b/tests/baselines/reference/declarationEmitWithInvalidPackageJsonTypings.js @@ -33,10 +33,11 @@ function useRef(current) { return { current: current }; } exports.useRef = useRef; -exports.useCsvParser = function () { +var useCsvParser = function () { var parserRef = useRef(null); return parserRef; }; +exports.useCsvParser = useCsvParser; //// [index.d.ts] diff --git a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt index 3e43a21f51d..d58378fa9b0 100644 --- a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt +++ b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt @@ -10,4 +10,5 @@ error TS5055: Cannot write file 'tests/cases/compiler/out.d.ts' because it would ==== tests/cases/compiler/a.ts (0 errors) ==== class d { - } \ No newline at end of file + } + \ No newline at end of file diff --git a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.js b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.js index fda8b290e82..1400e371c75 100644 --- a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.js +++ b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.js @@ -6,7 +6,8 @@ declare class c { //// [a.ts] class d { -} +} + //// [out.js] var d = /** @class */ (function () { diff --git a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.symbols b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.symbols index d4dd460df9f..31607388f7b 100644 --- a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.symbols +++ b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.symbols @@ -7,3 +7,4 @@ declare class c { class d { >d : Symbol(d, Decl(a.ts, 0, 0)) } + diff --git a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.types b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.types index aa64be40dbe..431781bbca4 100644 --- a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.types +++ b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.types @@ -7,3 +7,4 @@ declare class c { class d { >d : d } + diff --git a/tests/baselines/reference/declarationFilesGeneratingTypeReferences.js b/tests/baselines/reference/declarationFilesGeneratingTypeReferences.js index f928b064667..bbcd9f7f69b 100644 --- a/tests/baselines/reference/declarationFilesGeneratingTypeReferences.js +++ b/tests/baselines/reference/declarationFilesGeneratingTypeReferences.js @@ -9,7 +9,8 @@ interface JQuery { /// namespace Test { export var x: JQuery; -} +} + //// [out.js] /// diff --git a/tests/baselines/reference/declarationFilesGeneratingTypeReferences.symbols b/tests/baselines/reference/declarationFilesGeneratingTypeReferences.symbols index 28ae63fa4a9..83692e9ef6a 100644 --- a/tests/baselines/reference/declarationFilesGeneratingTypeReferences.symbols +++ b/tests/baselines/reference/declarationFilesGeneratingTypeReferences.symbols @@ -13,3 +13,4 @@ namespace Test { >x : Symbol(x, Decl(app.ts, 2, 14)) >JQuery : Symbol(JQuery, Decl(index.d.ts, 0, 0)) } + diff --git a/tests/baselines/reference/declarationFilesGeneratingTypeReferences.types b/tests/baselines/reference/declarationFilesGeneratingTypeReferences.types index eadf3b93faa..0c31c9dac29 100644 --- a/tests/baselines/reference/declarationFilesGeneratingTypeReferences.types +++ b/tests/baselines/reference/declarationFilesGeneratingTypeReferences.types @@ -11,3 +11,4 @@ namespace Test { export var x: JQuery; >x : JQuery } + diff --git a/tests/baselines/reference/declarationMapsOutFile.js b/tests/baselines/reference/declarationMapsOutFile.js index 47fb58fb98f..fae211af715 100644 --- a/tests/baselines/reference/declarationMapsOutFile.js +++ b/tests/baselines/reference/declarationMapsOutFile.js @@ -20,7 +20,7 @@ export { c, Foo }; //// [bundle.js] -define("a", ["require", "exports"], function (require, exports) { +define("example/a", ["require", "exports"], function (require, exports) { "use strict"; exports.__esModule = true; exports.Foo = void 0; @@ -37,7 +37,7 @@ define("a", ["require", "exports"], function (require, exports) { }()); exports.Foo = Foo; }); -define("index", ["require", "exports", "a"], function (require, exports, a_1) { +define("example/index", ["require", "exports", "example/a"], function (require, exports, a_1) { "use strict"; exports.__esModule = true; exports.Foo = exports.c = exports.x = void 0; @@ -50,7 +50,7 @@ define("index", ["require", "exports", "a"], function (require, exports, a_1) { //// [bundle.d.ts] -declare module "a" { +declare module "example/a" { export class Foo { doThing(x: { a: number; @@ -60,8 +60,8 @@ declare module "a" { static make(): Foo; } } -declare module "index" { - import { Foo } from "a"; +declare module "example/index" { + import { Foo } from "example/a"; const c: Foo; export let x: { b: number; diff --git a/tests/baselines/reference/declarationMapsOutFile.js.map b/tests/baselines/reference/declarationMapsOutFile.js.map index 31ad85d6650..1bea630c38a 100644 --- a/tests/baselines/reference/declarationMapsOutFile.js.map +++ b/tests/baselines/reference/declarationMapsOutFile.js.map @@ -1,3 +1,3 @@ //// [bundle.d.ts.map] -{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/index.ts"],"names":[],"mappings":";IAAA,MAAM,OAAO,GAAG;QACZ,OAAO,CAAC,GAAG;YAAC,CAAC,EAAE,MAAM,CAAA;SAAC;;;QAGtB,MAAM,CAAC,IAAI;KAGd;;;ICPD,OAAO,EAAC,GAAG,EAAC,UAAY;IAExB,MAAM,CAAC,KAAY,CAAC;IAGpB,MAAM,CAAC,IAAI,CAAC;;KAAqB,CAAC;IAClC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC"} -//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBtb2R1bGUgImEiIHsNCiAgICBleHBvcnQgY2xhc3MgRm9vIHsNCiAgICAgICAgZG9UaGluZyh4OiB7DQogICAgICAgICAgICBhOiBudW1iZXI7DQogICAgICAgIH0pOiB7DQogICAgICAgICAgICBiOiBudW1iZXI7DQogICAgICAgIH07DQogICAgICAgIHN0YXRpYyBtYWtlKCk6IEZvbzsNCiAgICB9DQp9DQpkZWNsYXJlIG1vZHVsZSAiaW5kZXgiIHsNCiAgICBpbXBvcnQgeyBGb28gfSBmcm9tICJhIjsNCiAgICBjb25zdCBjOiBGb287DQogICAgZXhwb3J0IGxldCB4OiB7DQogICAgICAgIGI6IG51bWJlcjsNCiAgICB9Ow0KICAgIGV4cG9ydCB7IGMsIEZvbyB9Ow0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9YnVuZGxlLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0ZXN0cy9jYXNlcy9jb21waWxlci9hLnRzIiwidGVzdHMvY2FzZXMvY29tcGlsZXIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtJQUFBLE1BQU0sT0FBTyxHQUFHO1FBQ1osT0FBTyxDQUFDLEdBQUc7WUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO1NBQUM7OztRQUd0QixNQUFNLENBQUMsSUFBSTtLQUdkOzs7SUNQRCxPQUFPLEVBQUMsR0FBRyxFQUFDLFVBQVk7SUFFeEIsTUFBTSxDQUFDLEtBQVksQ0FBQztJQUdwQixNQUFNLENBQUMsSUFBSSxDQUFDOztLQUFxQixDQUFDO0lBQ2xDLE9BQU8sRUFBRSxDQUFDLEVBQUUsR0FBRyxFQUFFLENBQUMifQ==,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgICBkb1RoaW5nKHg6IHthOiBudW1iZXJ9KSB7CiAgICAgICAgcmV0dXJuIHtiOiB4LmF9OwogICAgfQogICAgc3RhdGljIG1ha2UoKSB7CiAgICAgICAgcmV0dXJuIG5ldyBGb28oKTsKICAgIH0KfQ==,aW1wb3J0IHtGb299IGZyb20gIi4vYSI7Cgpjb25zdCBjID0gbmV3IEZvbygpOwpjLmRvVGhpbmcoe2E6IDQyfSk7CgpleHBvcnQgbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7CmV4cG9ydCB7IGMsIEZvbyB9Owo= +{"version":3,"file":"bundle.d.ts","sourceRoot":"","sources":["tests/cases/compiler/a.ts","tests/cases/compiler/index.ts"],"names":[],"mappings":";IAAA,MAAM,OAAO,GAAG;QACZ,OAAO,CAAC,GAAG;YAAC,CAAC,EAAE,MAAM,CAAA;SAAC;;;QAGtB,MAAM,CAAC,IAAI;KAGd;;;ICPD,OAAO,EAAC,GAAG,EAAC,kBAAY;IAExB,MAAM,CAAC,KAAY,CAAC;IAGpB,MAAM,CAAC,IAAI,CAAC;;KAAqB,CAAC;IAClC,OAAO,EAAE,CAAC,EAAE,GAAG,EAAE,CAAC"} +//// https://sokra.github.io/source-map-visualization#base64,ZGVjbGFyZSBtb2R1bGUgImV4YW1wbGUvYSIgew0KICAgIGV4cG9ydCBjbGFzcyBGb28gew0KICAgICAgICBkb1RoaW5nKHg6IHsNCiAgICAgICAgICAgIGE6IG51bWJlcjsNCiAgICAgICAgfSk6IHsNCiAgICAgICAgICAgIGI6IG51bWJlcjsNCiAgICAgICAgfTsNCiAgICAgICAgc3RhdGljIG1ha2UoKTogRm9vOw0KICAgIH0NCn0NCmRlY2xhcmUgbW9kdWxlICJleGFtcGxlL2luZGV4IiB7DQogICAgaW1wb3J0IHsgRm9vIH0gZnJvbSAiZXhhbXBsZS9hIjsNCiAgICBjb25zdCBjOiBGb287DQogICAgZXhwb3J0IGxldCB4OiB7DQogICAgICAgIGI6IG51bWJlcjsNCiAgICB9Ow0KICAgIGV4cG9ydCB7IGMsIEZvbyB9Ow0KfQ0KLy8jIHNvdXJjZU1hcHBpbmdVUkw9YnVuZGxlLmQudHMubWFw,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYnVuZGxlLmQudHMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJ0ZXN0cy9jYXNlcy9jb21waWxlci9hLnRzIiwidGVzdHMvY2FzZXMvY29tcGlsZXIvaW5kZXgudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IjtJQUFBLE1BQU0sT0FBTyxHQUFHO1FBQ1osT0FBTyxDQUFDLEdBQUc7WUFBQyxDQUFDLEVBQUUsTUFBTSxDQUFBO1NBQUM7OztRQUd0QixNQUFNLENBQUMsSUFBSTtLQUdkOzs7SUNQRCxPQUFPLEVBQUMsR0FBRyxFQUFDLGtCQUFZO0lBRXhCLE1BQU0sQ0FBQyxLQUFZLENBQUM7SUFHcEIsTUFBTSxDQUFDLElBQUksQ0FBQzs7S0FBcUIsQ0FBQztJQUNsQyxPQUFPLEVBQUUsQ0FBQyxFQUFFLEdBQUcsRUFBRSxDQUFDIn0=,ZXhwb3J0IGNsYXNzIEZvbyB7CiAgICBkb1RoaW5nKHg6IHthOiBudW1iZXJ9KSB7CiAgICAgICAgcmV0dXJuIHtiOiB4LmF9OwogICAgfQogICAgc3RhdGljIG1ha2UoKSB7CiAgICAgICAgcmV0dXJuIG5ldyBGb28oKTsKICAgIH0KfQ==,aW1wb3J0IHtGb299IGZyb20gIi4vYSI7Cgpjb25zdCBjID0gbmV3IEZvbygpOwpjLmRvVGhpbmcoe2E6IDQyfSk7CgpleHBvcnQgbGV0IHggPSBjLmRvVGhpbmcoe2E6IDEyfSk7CmV4cG9ydCB7IGMsIEZvbyB9Owo= diff --git a/tests/baselines/reference/declarationMapsOutFile.sourcemap.txt b/tests/baselines/reference/declarationMapsOutFile.sourcemap.txt index 26c730e30c4..277b08dda55 100644 --- a/tests/baselines/reference/declarationMapsOutFile.sourcemap.txt +++ b/tests/baselines/reference/declarationMapsOutFile.sourcemap.txt @@ -8,7 +8,7 @@ sources: tests/cases/compiler/a.ts,tests/cases/compiler/index.ts emittedFile:bundle.d.ts sourceFile:tests/cases/compiler/a.ts ------------------------------------------------------------------- ->>>declare module "a" { +>>>declare module "example/a" { >>> export class Foo { 1 >^^^^ 2 > ^^^^^^ @@ -95,14 +95,14 @@ emittedFile:bundle.d.ts sourceFile:tests/cases/compiler/index.ts ------------------------------------------------------------------- >>>} ->>>declare module "index" { ->>> import { Foo } from "a"; +>>>declare module "example/index" { +>>> import { Foo } from "example/a"; 1 >^^^^ 2 > ^^^^^^^ 3 > ^^ 4 > ^^^ 5 > ^^ -6 > ^^^^^^^^^^ +6 > ^^^^^^^^^^^^^^^^^^ 1 > 2 > import 3 > { @@ -114,7 +114,7 @@ sourceFile:tests/cases/compiler/index.ts 3 >Emitted(12, 14) Source(1, 9) + SourceIndex(1) 4 >Emitted(12, 17) Source(1, 12) + SourceIndex(1) 5 >Emitted(12, 19) Source(1, 13) + SourceIndex(1) -6 >Emitted(12, 29) Source(1, 25) + SourceIndex(1) +6 >Emitted(12, 37) Source(1, 25) + SourceIndex(1) --- >>> const c: Foo; 1 >^^^^ diff --git a/tests/baselines/reference/declarationsForFileShadowingGlobalNoError.js b/tests/baselines/reference/declarationsForFileShadowingGlobalNoError.js index 561bed919c3..c83fa135485 100644 --- a/tests/baselines/reference/declarationsForFileShadowingGlobalNoError.js +++ b/tests/baselines/reference/declarationsForFileShadowingGlobalNoError.js @@ -39,7 +39,7 @@ var __extends = (this && this.__extends) || (function () { })(); exports.__esModule = true; exports.mixin = void 0; -exports.mixin = function (Base) { +var mixin = function (Base) { return /** @class */ (function (_super) { __extends(class_1, _super); function class_1() { @@ -49,6 +49,7 @@ exports.mixin = function (Base) { return class_1; }(Base)); }; +exports.mixin = mixin; //// [dom.d.ts] diff --git a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js index 8039b6ecec3..c49fd6c0689 100644 --- a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js +++ b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.js @@ -57,7 +57,7 @@ var __assign = (this && this.__assign) || function () { }; exports.__esModule = true; exports.testRecFun = exports.updateIfChanged = void 0; -exports.updateIfChanged = function (t) { +var updateIfChanged = function (t) { var reduce = function (u, update) { var set = function (newU) { return Object.is(u, newU) ? t : update(newU); }; return Object.assign(function (key) { @@ -69,8 +69,9 @@ exports.updateIfChanged = function (t) { }; return reduce(t, function (t) { return t; }); }; +exports.updateIfChanged = updateIfChanged; // example from https://github.com/microsoft/TypeScript/issues/31605 -exports.testRecFun = function (parent) { +var testRecFun = function (parent) { return { result: parent, deeper: function (child) { @@ -78,6 +79,7 @@ exports.testRecFun = function (parent) { } }; }; +exports.testRecFun = testRecFun; var p1 = exports.testRecFun({ one: '1' }); void p1.result.one; var p2 = p1.deeper({ two: '2' }); diff --git a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types index 7aff4276be7..2501ef2882d 100644 --- a/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types +++ b/tests/baselines/reference/declarationsWithRecursiveInternalTypesProduceUniqueTypeParams.types @@ -67,9 +67,9 @@ export const updateIfChanged = (t: T) => { >assign : { (target: T, source: U): T & U; (target: T, source1: U, source2: V): T & U & V; (target: T, source1: U, source2: V, source3: W): T & U & V & W; (target: object, ...sources: any[]): any; } >Array.isArray(u) ? [] : {} : undefined[] | {} >Array.isArray(u) : boolean ->Array.isArray : (arg: any) => arg is any[] +>Array.isArray : (arg: {} | T) => arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[] >Array : ArrayConstructor ->isArray : (arg: any) => arg is any[] +>isArray : (arg: {} | T) => arg is T extends readonly any[] ? unknown extends T ? never : readonly any[] : any[] >u : U >[] : undefined[] >{} : {} diff --git a/tests/baselines/reference/deduplicateImportsInSystem.errors.txt b/tests/baselines/reference/deduplicateImportsInSystem.errors.txt index e77bd5cfaa0..b16a119650c 100644 --- a/tests/baselines/reference/deduplicateImportsInSystem.errors.txt +++ b/tests/baselines/reference/deduplicateImportsInSystem.errors.txt @@ -1,29 +1,29 @@ -tests/cases/compiler/deduplicateImportsInSystem.ts(1,17): error TS2307: Cannot find module 'f1' or its corresponding type declarations. -tests/cases/compiler/deduplicateImportsInSystem.ts(2,17): error TS2307: Cannot find module 'f2' or its corresponding type declarations. -tests/cases/compiler/deduplicateImportsInSystem.ts(3,17): error TS2307: Cannot find module 'f3' or its corresponding type declarations. -tests/cases/compiler/deduplicateImportsInSystem.ts(4,17): error TS2307: Cannot find module 'f2' or its corresponding type declarations. -tests/cases/compiler/deduplicateImportsInSystem.ts(5,17): error TS2307: Cannot find module 'f2' or its corresponding type declarations. -tests/cases/compiler/deduplicateImportsInSystem.ts(6,17): error TS2307: Cannot find module 'f1' or its corresponding type declarations. +tests/cases/compiler/deduplicateImportsInSystem.ts(1,17): error TS2792: Cannot find module 'f1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/deduplicateImportsInSystem.ts(2,17): error TS2792: Cannot find module 'f2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/deduplicateImportsInSystem.ts(3,17): error TS2792: Cannot find module 'f3'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/deduplicateImportsInSystem.ts(4,17): error TS2792: Cannot find module 'f2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/deduplicateImportsInSystem.ts(5,17): error TS2792: Cannot find module 'f2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? +tests/cases/compiler/deduplicateImportsInSystem.ts(6,17): error TS2792: Cannot find module 'f1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? ==== tests/cases/compiler/deduplicateImportsInSystem.ts (6 errors) ==== import {A} from "f1"; ~~~~ -!!! error TS2307: Cannot find module 'f1' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'f1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import {B} from "f2"; ~~~~ -!!! error TS2307: Cannot find module 'f2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'f2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import {C} from "f3"; ~~~~ -!!! error TS2307: Cannot find module 'f3' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'f3'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import {D} from 'f2'; ~~~~ -!!! error TS2307: Cannot find module 'f2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'f2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import {E} from "f2"; ~~~~ -!!! error TS2307: Cannot find module 'f2' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'f2'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? import {F} from 'f1'; ~~~~ -!!! error TS2307: Cannot find module 'f1' or its corresponding type declarations. +!!! error TS2792: Cannot find module 'f1'. Did you mean to set the 'moduleResolution' option to 'node', or to add aliases to the 'paths' option? console.log(A + B + C + D + E + F) \ No newline at end of file diff --git a/tests/baselines/reference/deepKeysIndexing.types b/tests/baselines/reference/deepKeysIndexing.types index 2ab30881781..d76919c719c 100644 --- a/tests/baselines/reference/deepKeysIndexing.types +++ b/tests/baselines/reference/deepKeysIndexing.types @@ -33,7 +33,7 @@ type keys2workaround = Extract< interface Foo extends DeepObject { a: { ->a : { 1: 123; 2: string; 3: boolean; } +>a : { "1": 123; "2": string; "3": boolean; } "1": 123; >"1" : 123 diff --git a/tests/baselines/reference/deeplyNestedConditionalTypes.types b/tests/baselines/reference/deeplyNestedConditionalTypes.types index d233e86bbbb..ef0511f7f3f 100644 --- a/tests/baselines/reference/deeplyNestedConditionalTypes.types +++ b/tests/baselines/reference/deeplyNestedConditionalTypes.types @@ -108,5 +108,5 @@ type T0 = Foo<99>; >T0 : "99" type T1 = Foo; ->T1 : "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "32" | "33" | "34" | "35" | "36" | "37" | "38" | "39" | "40" | "41" | "42" | "43" | "44" | "45" | "46" | "47" | "48" | "49" | "50" | "51" | "52" | "53" | "54" | "55" | "56" | "57" | "58" | "59" | "60" | "61" | "62" | "63" | "64" | "65" | "66" | "67" | "68" | "69" | "70" | "71" | "72" | "73" | "74" | "75" | "76" | "77" | "78" | "79" | "80" | "81" | "82" | "83" | "84" | "85" | "86" | "87" | "88" | "89" | "90" | "91" | "92" | "93" | "94" | "95" | "96" | "97" | "98" | "99" +>T1 : "99" | "0" | "1" | "2" | "3" | "4" | "5" | "6" | "7" | "8" | "9" | "10" | "11" | "12" | "13" | "14" | "15" | "16" | "17" | "18" | "19" | "20" | "21" | "22" | "23" | "24" | "25" | "26" | "27" | "28" | "29" | "30" | "31" | "32" | "33" | "34" | "35" | "36" | "37" | "38" | "39" | "40" | "41" | "42" | "43" | "44" | "45" | "46" | "47" | "48" | "49" | "50" | "51" | "52" | "53" | "54" | "55" | "56" | "57" | "58" | "59" | "60" | "61" | "62" | "63" | "64" | "65" | "66" | "67" | "68" | "69" | "70" | "71" | "72" | "73" | "74" | "75" | "76" | "77" | "78" | "79" | "80" | "81" | "82" | "83" | "84" | "85" | "86" | "87" | "88" | "89" | "90" | "91" | "92" | "93" | "94" | "95" | "96" | "97" | "98" diff --git a/tests/baselines/reference/defaultExportInAwaitExpression01.types b/tests/baselines/reference/defaultExportInAwaitExpression01.types index 5c8620ae1dc..81f8d4bdc59 100644 --- a/tests/baselines/reference/defaultExportInAwaitExpression01.types +++ b/tests/baselines/reference/defaultExportInAwaitExpression01.types @@ -3,11 +3,11 @@ const x = new Promise( ( resolve, reject ) => { resolve( {} ); } ); >x : Promise >new Promise( ( resolve, reject ) => { resolve( {} ); } ) : Promise >Promise : PromiseConstructor ->( resolve, reject ) => { resolve( {} ); } : (resolve: (value?: unknown) => void, reject: (reason?: any) => void) => void ->resolve : (value?: unknown) => void +>( resolve, reject ) => { resolve( {} ); } : (resolve: (value: unknown) => void, reject: (reason?: any) => void) => void +>resolve : (value: unknown) => void >reject : (reason?: any) => void >resolve( {} ) : void ->resolve : (value?: unknown) => void +>resolve : (value: unknown) => void >{} : {} export default x; diff --git a/tests/baselines/reference/defaultExportInAwaitExpression02.types b/tests/baselines/reference/defaultExportInAwaitExpression02.types index 5c8620ae1dc..81f8d4bdc59 100644 --- a/tests/baselines/reference/defaultExportInAwaitExpression02.types +++ b/tests/baselines/reference/defaultExportInAwaitExpression02.types @@ -3,11 +3,11 @@ const x = new Promise( ( resolve, reject ) => { resolve( {} ); } ); >x : Promise >new Promise( ( resolve, reject ) => { resolve( {} ); } ) : Promise >Promise : PromiseConstructor ->( resolve, reject ) => { resolve( {} ); } : (resolve: (value?: unknown) => void, reject: (reason?: any) => void) => void ->resolve : (value?: unknown) => void +>( resolve, reject ) => { resolve( {} ); } : (resolve: (value: unknown) => void, reject: (reason?: any) => void) => void +>resolve : (value: unknown) => void >reject : (reason?: any) => void >resolve( {} ) : void ->resolve : (value?: unknown) => void +>resolve : (value: unknown) => void >{} : {} export default x; diff --git a/tests/baselines/reference/defaultPropertyAssignedClassWithPrototype.symbols b/tests/baselines/reference/defaultPropertyAssignedClassWithPrototype.symbols new file mode 100644 index 00000000000..dbe951dcf54 --- /dev/null +++ b/tests/baselines/reference/defaultPropertyAssignedClassWithPrototype.symbols @@ -0,0 +1,33 @@ +=== tests/cases/conformance/salsa/bug39167.js === +var test = {}; +>test : Symbol(test, Decl(bug39167.js, 0, 3), Decl(bug39167.js, 0, 14), Decl(bug39167.js, 2, 18)) + +test.K = test.K || +>test.K : Symbol(test.K, Decl(bug39167.js, 0, 14), Decl(bug39167.js, 4, 5)) +>test : Symbol(test, Decl(bug39167.js, 0, 3), Decl(bug39167.js, 0, 14), Decl(bug39167.js, 2, 18)) +>K : Symbol(test.K, Decl(bug39167.js, 0, 14), Decl(bug39167.js, 4, 5)) +>test.K : Symbol(test.K, Decl(bug39167.js, 0, 14), Decl(bug39167.js, 4, 5)) +>test : Symbol(test, Decl(bug39167.js, 0, 3), Decl(bug39167.js, 0, 14), Decl(bug39167.js, 2, 18)) +>K : Symbol(test.K, Decl(bug39167.js, 0, 14), Decl(bug39167.js, 4, 5)) + + function () {} + +test.K.prototype = { +>test.K.prototype : Symbol(test.K.prototype, Decl(bug39167.js, 2, 18)) +>test.K : Symbol(test.K, Decl(bug39167.js, 0, 14), Decl(bug39167.js, 4, 5)) +>test : Symbol(test, Decl(bug39167.js, 0, 3), Decl(bug39167.js, 0, 14), Decl(bug39167.js, 2, 18)) +>K : Symbol(test.K, Decl(bug39167.js, 0, 14), Decl(bug39167.js, 4, 5)) +>prototype : Symbol(test.K.prototype, Decl(bug39167.js, 2, 18)) + + add() {} +>add : Symbol(add, Decl(bug39167.js, 4, 20)) + +}; + +new test.K().add; +>new test.K().add : Symbol(add, Decl(bug39167.js, 4, 20)) +>test.K : Symbol(test.K, Decl(bug39167.js, 0, 14), Decl(bug39167.js, 4, 5)) +>test : Symbol(test, Decl(bug39167.js, 0, 3), Decl(bug39167.js, 0, 14), Decl(bug39167.js, 2, 18)) +>K : Symbol(test.K, Decl(bug39167.js, 0, 14), Decl(bug39167.js, 4, 5)) +>add : Symbol(add, Decl(bug39167.js, 4, 20)) + diff --git a/tests/baselines/reference/defaultPropertyAssignedClassWithPrototype.types b/tests/baselines/reference/defaultPropertyAssignedClassWithPrototype.types new file mode 100644 index 00000000000..81f4e5bc641 --- /dev/null +++ b/tests/baselines/reference/defaultPropertyAssignedClassWithPrototype.types @@ -0,0 +1,40 @@ +=== tests/cases/conformance/salsa/bug39167.js === +var test = {}; +>test : typeof test +>{} : {} + +test.K = test.K || +>test.K = test.K || function () {} : typeof K +>test.K : typeof K +>test : typeof test +>K : typeof K +>test.K || function () {} : typeof K +>test.K : typeof K +>test : typeof test +>K : typeof K + + function () {} +>function () {} : typeof K + +test.K.prototype = { +>test.K.prototype = { add() {}} : { add(): void; } +>test.K.prototype : { add(): void; } +>test.K : typeof K +>test : typeof test +>K : typeof K +>prototype : { add(): void; } +>{ add() {}} : { add(): void; } + + add() {} +>add : () => void + +}; + +new test.K().add; +>new test.K().add : () => void +>new test.K() : K +>test.K : typeof K +>test : typeof test +>K : typeof K +>add : () => void + diff --git a/tests/baselines/reference/definiteAssignmentAssertions.errors.txt b/tests/baselines/reference/definiteAssignmentAssertions.errors.txt index dea5e45aa82..a4f7f80a51b 100644 --- a/tests/baselines/reference/definiteAssignmentAssertions.errors.txt +++ b/tests/baselines/reference/definiteAssignmentAssertions.errors.txt @@ -1,17 +1,19 @@ tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(5,5): error TS2564: Property 'b' has no initializer and is not definitely assigned in the constructor. -tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(20,6): error TS1255: A definite assignment assertion '!' is not permitted in this context. -tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(21,6): error TS1255: A definite assignment assertion '!' is not permitted in this context. +tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(20,6): error TS1263: Declarations with initializers cannot also have definite assignment assertions. +tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(21,6): error TS1263: Declarations with initializers cannot also have definite assignment assertions. tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(22,13): error TS1255: A definite assignment assertion '!' is not permitted in this context. -tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(28,6): error TS1255: A definite assignment assertion '!' is not permitted in this context. -tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(34,15): error TS1255: A definite assignment assertion '!' is not permitted in this context. -tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(68,10): error TS1258: Definite assignment assertions can only be used along with a type annotation. -tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(69,10): error TS1258: Definite assignment assertions can only be used along with a type annotation. -tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(70,10): error TS1258: Definite assignment assertions can only be used along with a type annotation. -tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(75,15): error TS1258: Definite assignment assertions can only be used along with a type annotation. -tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(76,15): error TS1258: Definite assignment assertions can only be used along with a type annotation. +tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(23,5): error TS7008: Member 'd' implicitly has an 'any' type. +tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(23,6): error TS1264: Declarations with definite assignment assertions must also have type annotations. +tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(29,6): error TS1255: A definite assignment assertion '!' is not permitted in this context. +tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(35,15): error TS1255: A definite assignment assertion '!' is not permitted in this context. +tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(69,10): error TS1264: Declarations with definite assignment assertions must also have type annotations. +tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(70,10): error TS1263: Declarations with initializers cannot also have definite assignment assertions. +tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(71,10): error TS1263: Declarations with initializers cannot also have definite assignment assertions. +tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(76,15): error TS1264: Declarations with definite assignment assertions must also have type annotations. +tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(77,15): error TS1264: Declarations with definite assignment assertions must also have type annotations. -==== tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts (11 errors) ==== +==== tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts (13 errors) ==== // Suppress strict property initialization check class C1 { @@ -35,13 +37,18 @@ tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(76,15): erro class C3 { a! = 1; ~ -!!! error TS1255: A definite assignment assertion '!' is not permitted in this context. +!!! error TS1263: Declarations with initializers cannot also have definite assignment assertions. b!: number = 1; ~ -!!! error TS1255: A definite assignment assertion '!' is not permitted in this context. +!!! error TS1263: Declarations with initializers cannot also have definite assignment assertions. static c!: number; ~ !!! error TS1255: A definite assignment assertion '!' is not permitted in this context. + d!; + ~ +!!! error TS7008: Member 'd' implicitly has an 'any' type. + ~ +!!! error TS1264: Declarations with definite assignment assertions must also have type annotations. } // Definite assignment assertion not permitted in ambient context @@ -93,21 +100,21 @@ tests/cases/conformance/controlFlow/definiteAssignmentAssertions.ts(76,15): erro function f4() { let a!; ~ -!!! error TS1258: Definite assignment assertions can only be used along with a type annotation. +!!! error TS1264: Declarations with definite assignment assertions must also have type annotations. let b! = 1; ~ -!!! error TS1258: Definite assignment assertions can only be used along with a type annotation. +!!! error TS1263: Declarations with initializers cannot also have definite assignment assertions. let c!: number = 1; ~ -!!! error TS1258: Definite assignment assertions can only be used along with a type annotation. +!!! error TS1263: Declarations with initializers cannot also have definite assignment assertions. } // Definite assignment assertion not permitted in ambient context declare let v1!: number; ~ -!!! error TS1258: Definite assignment assertions can only be used along with a type annotation. +!!! error TS1264: Declarations with definite assignment assertions must also have type annotations. declare var v2!: number; ~ -!!! error TS1258: Definite assignment assertions can only be used along with a type annotation. +!!! error TS1264: Declarations with definite assignment assertions must also have type annotations. \ No newline at end of file diff --git a/tests/baselines/reference/definiteAssignmentAssertions.js b/tests/baselines/reference/definiteAssignmentAssertions.js index 70bab1b9c23..6ee50717ec6 100644 --- a/tests/baselines/reference/definiteAssignmentAssertions.js +++ b/tests/baselines/reference/definiteAssignmentAssertions.js @@ -21,6 +21,7 @@ class C3 { a! = 1; b!: number = 1; static c!: number; + d!; } // Definite assignment assertion not permitted in ambient context @@ -151,6 +152,7 @@ declare class C3 { a: number; b: number; static c: number; + d: any; } declare class C4 { a: number; diff --git a/tests/baselines/reference/definiteAssignmentAssertions.symbols b/tests/baselines/reference/definiteAssignmentAssertions.symbols index a291172c83b..08cc5862f6b 100644 --- a/tests/baselines/reference/definiteAssignmentAssertions.symbols +++ b/tests/baselines/reference/definiteAssignmentAssertions.symbols @@ -41,106 +41,109 @@ class C3 { static c!: number; >c : Symbol(C3.c, Decl(definiteAssignmentAssertions.ts, 20, 19)) + + d!; +>d : Symbol(C3.d, Decl(definiteAssignmentAssertions.ts, 21, 22)) } // Definite assignment assertion not permitted in ambient context declare class C4 { ->C4 : Symbol(C4, Decl(definiteAssignmentAssertions.ts, 22, 1)) +>C4 : Symbol(C4, Decl(definiteAssignmentAssertions.ts, 23, 1)) a!: number; ->a : Symbol(C4.a, Decl(definiteAssignmentAssertions.ts, 26, 18)) +>a : Symbol(C4.a, Decl(definiteAssignmentAssertions.ts, 27, 18)) } // Definite assignment assertion not permitted on abstract property abstract class C5 { ->C5 : Symbol(C5, Decl(definiteAssignmentAssertions.ts, 28, 1)) +>C5 : Symbol(C5, Decl(definiteAssignmentAssertions.ts, 29, 1)) abstract a!: number; ->a : Symbol(C5.a, Decl(definiteAssignmentAssertions.ts, 32, 19)) +>a : Symbol(C5.a, Decl(definiteAssignmentAssertions.ts, 33, 19)) } // Suppress definite assignment check for variable function f1() { ->f1 : Symbol(f1, Decl(definiteAssignmentAssertions.ts, 34, 1)) +>f1 : Symbol(f1, Decl(definiteAssignmentAssertions.ts, 35, 1)) let x!: number; ->x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 39, 7)) +>x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 40, 7)) let y = x; ->y : Symbol(y, Decl(definiteAssignmentAssertions.ts, 40, 7)) ->x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 39, 7)) +>y : Symbol(y, Decl(definiteAssignmentAssertions.ts, 41, 7)) +>x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 40, 7)) var a!: number; ->a : Symbol(a, Decl(definiteAssignmentAssertions.ts, 41, 7)) +>a : Symbol(a, Decl(definiteAssignmentAssertions.ts, 42, 7)) var b = a; ->b : Symbol(b, Decl(definiteAssignmentAssertions.ts, 42, 7)) ->a : Symbol(a, Decl(definiteAssignmentAssertions.ts, 41, 7)) +>b : Symbol(b, Decl(definiteAssignmentAssertions.ts, 43, 7)) +>a : Symbol(a, Decl(definiteAssignmentAssertions.ts, 42, 7)) } function f2() { ->f2 : Symbol(f2, Decl(definiteAssignmentAssertions.ts, 43, 1)) +>f2 : Symbol(f2, Decl(definiteAssignmentAssertions.ts, 44, 1)) let x!: string | number; ->x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 46, 7)) +>x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 47, 7)) if (typeof x === "string") { ->x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 46, 7)) +>x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 47, 7)) let s: string = x; ->s : Symbol(s, Decl(definiteAssignmentAssertions.ts, 48, 11)) ->x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 46, 7)) +>s : Symbol(s, Decl(definiteAssignmentAssertions.ts, 49, 11)) +>x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 47, 7)) } else { let n: number = x; ->n : Symbol(n, Decl(definiteAssignmentAssertions.ts, 51, 11)) ->x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 46, 7)) +>n : Symbol(n, Decl(definiteAssignmentAssertions.ts, 52, 11)) +>x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 47, 7)) } } function f3() { ->f3 : Symbol(f3, Decl(definiteAssignmentAssertions.ts, 53, 1)) +>f3 : Symbol(f3, Decl(definiteAssignmentAssertions.ts, 54, 1)) let x!: number; ->x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 56, 7)) +>x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 57, 7)) const g = () => { ->g : Symbol(g, Decl(definiteAssignmentAssertions.ts, 57, 9)) +>g : Symbol(g, Decl(definiteAssignmentAssertions.ts, 58, 9)) x = 1; ->x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 56, 7)) +>x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 57, 7)) } g(); ->g : Symbol(g, Decl(definiteAssignmentAssertions.ts, 57, 9)) +>g : Symbol(g, Decl(definiteAssignmentAssertions.ts, 58, 9)) let y = x; ->y : Symbol(y, Decl(definiteAssignmentAssertions.ts, 61, 7)) ->x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 56, 7)) +>y : Symbol(y, Decl(definiteAssignmentAssertions.ts, 62, 7)) +>x : Symbol(x, Decl(definiteAssignmentAssertions.ts, 57, 7)) } // Definite assignment assertion requires type annotation and no initializer function f4() { ->f4 : Symbol(f4, Decl(definiteAssignmentAssertions.ts, 62, 1)) +>f4 : Symbol(f4, Decl(definiteAssignmentAssertions.ts, 63, 1)) let a!; ->a : Symbol(a, Decl(definiteAssignmentAssertions.ts, 67, 7)) +>a : Symbol(a, Decl(definiteAssignmentAssertions.ts, 68, 7)) let b! = 1; ->b : Symbol(b, Decl(definiteAssignmentAssertions.ts, 68, 7)) +>b : Symbol(b, Decl(definiteAssignmentAssertions.ts, 69, 7)) let c!: number = 1; ->c : Symbol(c, Decl(definiteAssignmentAssertions.ts, 69, 7)) +>c : Symbol(c, Decl(definiteAssignmentAssertions.ts, 70, 7)) } // Definite assignment assertion not permitted in ambient context declare let v1!: number; ->v1 : Symbol(v1, Decl(definiteAssignmentAssertions.ts, 74, 11)) +>v1 : Symbol(v1, Decl(definiteAssignmentAssertions.ts, 75, 11)) declare var v2!: number; ->v2 : Symbol(v2, Decl(definiteAssignmentAssertions.ts, 75, 11)) +>v2 : Symbol(v2, Decl(definiteAssignmentAssertions.ts, 76, 11)) diff --git a/tests/baselines/reference/definiteAssignmentAssertions.types b/tests/baselines/reference/definiteAssignmentAssertions.types index 95eaf7853b3..b98839d3383 100644 --- a/tests/baselines/reference/definiteAssignmentAssertions.types +++ b/tests/baselines/reference/definiteAssignmentAssertions.types @@ -43,6 +43,9 @@ class C3 { static c!: number; >c : number + + d!; +>d : any } // Definite assignment assertion not permitted in ambient context diff --git a/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.errors.txt b/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.errors.txt index d6625904b2b..1b2036fced6 100644 --- a/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.errors.txt +++ b/tests/baselines/reference/definiteAssignmentWithErrorStillStripped.errors.txt @@ -1,9 +1,9 @@ -tests/cases/compiler/definiteAssignmentWithErrorStillStripped.ts(2,6): error TS1255: A definite assignment assertion '!' is not permitted in this context. +tests/cases/compiler/definiteAssignmentWithErrorStillStripped.ts(2,6): error TS1264: Declarations with definite assignment assertions must also have type annotations. ==== tests/cases/compiler/definiteAssignmentWithErrorStillStripped.ts (1 errors) ==== class C { p!; ~ -!!! error TS1255: A definite assignment assertion '!' is not permitted in this context. +!!! error TS1264: Declarations with definite assignment assertions must also have type annotations. } \ No newline at end of file diff --git a/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment4.errors.txt b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment4.errors.txt new file mode 100644 index 00000000000..6d344015ca7 --- /dev/null +++ b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment4.errors.txt @@ -0,0 +1,12 @@ +tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment4.ts(5,7): error TS2548: Type 'number[] | null' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator. + + +==== tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment4.ts (1 errors) ==== + // #35497 + + + declare const data: number[] | null; + const [value] = data; // Error + ~~~~~~~ +!!! error TS2548: Type 'number[] | null' is not an array type or does not have a '[Symbol.iterator]()' method that returns an iterator. + \ No newline at end of file diff --git a/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment4.js b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment4.js new file mode 100644 index 00000000000..8329982621f --- /dev/null +++ b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment4.js @@ -0,0 +1,28 @@ +//// [destructuringArrayBindingPatternAndAssignment4.ts] +// #35497 + + +declare const data: number[] | null; +const [value] = data; // Error + + +//// [destructuringArrayBindingPatternAndAssignment4.js] +"use strict"; +// #35497 +var __read = (this && this.__read) || function (o, n) { + var m = typeof Symbol === "function" && o[Symbol.iterator]; + if (!m) return o; + var i = m.call(o), r, ar = [], e; + try { + while ((n === void 0 || n-- > 0) && !(r = i.next()).done) ar.push(r.value); + } + catch (error) { e = { error: error }; } + finally { + try { + if (r && !r.done && (m = i["return"])) m.call(i); + } + finally { if (e) throw e.error; } + } + return ar; +}; +var _a = __read(data, 1), value = _a[0]; // Error diff --git a/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment4.symbols b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment4.symbols new file mode 100644 index 00000000000..f1d6365814b --- /dev/null +++ b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment4.symbols @@ -0,0 +1,11 @@ +=== tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment4.ts === +// #35497 + + +declare const data: number[] | null; +>data : Symbol(data, Decl(destructuringArrayBindingPatternAndAssignment4.ts, 3, 13)) + +const [value] = data; // Error +>value : Symbol(value, Decl(destructuringArrayBindingPatternAndAssignment4.ts, 4, 7)) +>data : Symbol(data, Decl(destructuringArrayBindingPatternAndAssignment4.ts, 3, 13)) + diff --git a/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment4.types b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment4.types new file mode 100644 index 00000000000..20367ebf11f --- /dev/null +++ b/tests/baselines/reference/destructuringArrayBindingPatternAndAssignment4.types @@ -0,0 +1,12 @@ +=== tests/cases/conformance/es6/destructuring/destructuringArrayBindingPatternAndAssignment4.ts === +// #35497 + + +declare const data: number[] | null; +>data : number[] | null +>null : null + +const [value] = data; // Error +>value : any +>data : number[] | null + diff --git a/tests/baselines/reference/didYouMeanSuggestionErrors.errors.txt b/tests/baselines/reference/didYouMeanSuggestionErrors.errors.txt index a41b19ecd9d..fe1d866bb00 100644 --- a/tests/baselines/reference/didYouMeanSuggestionErrors.errors.txt +++ b/tests/baselines/reference/didYouMeanSuggestionErrors.errors.txt @@ -1,14 +1,14 @@ -tests/cases/compiler/didYouMeanSuggestionErrors.ts(1,1): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`. -tests/cases/compiler/didYouMeanSuggestionErrors.ts(2,5): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`. -tests/cases/compiler/didYouMeanSuggestionErrors.ts(3,19): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`. -tests/cases/compiler/didYouMeanSuggestionErrors.ts(7,1): error TS2582: Cannot find name 'suite'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`. -tests/cases/compiler/didYouMeanSuggestionErrors.ts(8,5): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`. +tests/cases/compiler/didYouMeanSuggestionErrors.ts(1,1): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +tests/cases/compiler/didYouMeanSuggestionErrors.ts(2,5): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +tests/cases/compiler/didYouMeanSuggestionErrors.ts(3,19): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. +tests/cases/compiler/didYouMeanSuggestionErrors.ts(7,1): error TS2582: Cannot find name 'suite'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. +tests/cases/compiler/didYouMeanSuggestionErrors.ts(8,5): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. tests/cases/compiler/didYouMeanSuggestionErrors.ts(9,9): error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'. -tests/cases/compiler/didYouMeanSuggestionErrors.ts(9,21): error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i @types/node`. +tests/cases/compiler/didYouMeanSuggestionErrors.ts(9,21): error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. tests/cases/compiler/didYouMeanSuggestionErrors.ts(10,9): error TS2584: Cannot find name 'document'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'. -tests/cases/compiler/didYouMeanSuggestionErrors.ts(12,19): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node`. -tests/cases/compiler/didYouMeanSuggestionErrors.ts(13,19): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i @types/node`. -tests/cases/compiler/didYouMeanSuggestionErrors.ts(14,19): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`. +tests/cases/compiler/didYouMeanSuggestionErrors.ts(12,19): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +tests/cases/compiler/didYouMeanSuggestionErrors.ts(13,19): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. +tests/cases/compiler/didYouMeanSuggestionErrors.ts(14,19): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. tests/cases/compiler/didYouMeanSuggestionErrors.ts(16,23): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. tests/cases/compiler/didYouMeanSuggestionErrors.ts(17,23): error TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. tests/cases/compiler/didYouMeanSuggestionErrors.ts(18,23): error TS2583: Cannot find name 'WeakMap'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later. @@ -22,40 +22,40 @@ tests/cases/compiler/didYouMeanSuggestionErrors.ts(24,18): error TS2583: Cannot ==== tests/cases/compiler/didYouMeanSuggestionErrors.ts (19 errors) ==== describe("my test suite", () => { ~~~~~~~~ -!!! error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`. +!!! error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. it("should run", () => { ~~ -!!! error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`. +!!! error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. const a = $(".thing"); ~ -!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`. +!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i --save-dev @types/jquery`. }); }); suite("another suite", () => { ~~~~~ -!!! error TS2582: Cannot find name 'suite'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`. +!!! error TS2582: Cannot find name 'suite'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. test("everything else", () => { ~~~~ -!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`. +!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i --save-dev @types/jest` or `npm i --save-dev @types/mocha`. console.log(process.env); ~~~~~~~ !!! error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'. ~~~~~~~ -!!! error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i @types/node`. +!!! error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. document.createElement("div"); ~~~~~~~~ !!! error TS2584: Cannot find name 'document'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'. const x = require("fs"); ~~~~~~~ -!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node`. +!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. const y = Buffer.from([]); ~~~~~~ -!!! error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i @types/node`. +!!! error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. const z = module.exports; ~~~~~~ -!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`. +!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i --save-dev @types/node`. const a = new Map(); ~~~ diff --git a/tests/baselines/reference/docker/azure-sdk.log b/tests/baselines/reference/docker/azure-sdk.log index 6f9a762ca26..f8e59ce4c87 100644 --- a/tests/baselines/reference/docker/azure-sdk.log +++ b/tests/baselines/reference/docker/azure-sdk.log @@ -2,139 +2,140 @@ Exit Code: 1 Standard output: Rush Multi-Project Build Tool 5.X.X - https://rushjs.io -Node.js version is 12.16.1 (LTS) +Node.js version is 14.11.0 (pre-LTS) Starting "rush rebuild" Executing a maximum of ?simultaneous processes... -XX of XX: [@azure/abort-controller] completed successfully in ? seconds -XX of XX: [@azure/core-auth] completed successfully in ? seconds XX of XX: [@azure/logger] completed successfully in ? seconds -XX of XX: [@azure/core-asynciterator-polyfill] completed successfully in ? seconds -XX of XX: [@azure/core-http] completed successfully in ? seconds -XX of XX: [@azure/core-amqp] completed successfully in ? seconds -XX of XX: [@azure/core-lro] completed successfully in ? seconds -XX of XX: [@azure/core-paging] completed successfully in ? seconds -XX of XX: [@azure/test-utils-recorder] completed successfully in ? seconds -XX of XX: [@azure/eslint-plugin-azure-sdk] completed successfully in ? seconds -XX of XX: [@azure/event-hubs] completed successfully in ? seconds -XX of XX: [@azure/event-processor-host] completed successfully in ? seconds -npm ERR! code ELIFECYCLE -npm ERR! errno 2 -npm ERR! @azure/keyvault-keys@X.X.X-preview.2 extract-api: `tsc -p . && api-extractor run --local` -npm ERR! Exit status 2 -npm ERR! -npm ERR! Failed at the @azure/keyvault-keys@X.X.X-preview.2 extract-api script. -npm ERR! This is probably not a problem with npm. There is likely additional logging output above. -npm ERR! A complete log of this run can be found in: -npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log -npm ERR! code ELIFECYCLE -npm ERR! errno 2 -npm ERR! @azure/keyvault-secrets@X.X.X-preview.2 extract-api: `tsc -p . && api-extractor run --local` -npm ERR! Exit status 2 -npm ERR! -npm ERR! Failed at the @azure/keyvault-secrets@X.X.X-preview.2 extract-api script. -npm ERR! This is probably not a problem with npm. There is likely additional logging output above. -npm ERR! A complete log of this run can be found in: -npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log -XX of XX: [@azure/storage-blob] completed successfully in ? seconds -XX of XX: [@azure/ai-text-analytics] completed successfully in ? seconds -XX of XX: [@azure/app-configuration] completed successfully in ? seconds -XX of XX: [@azure/core-arm] completed successfully in ? seconds -XX of XX: [@azure/core-tracing] completed successfully in ? seconds -dist-esm/index.js → dist/index.js... -(!) Unresolved dependencies -https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency -os-name (imported by dist-esm/utils/user-agent.js) -(!) Missing global variable name -Use output.globals to specify browser global variable names corresponding to external modules -os-name (guessing 'osName') -created dist/index.js in ?s -XX of XX: [@azure/eventhubs-checkpointstore-blob] completed successfully in ? seconds -XX of XX: [@azure/identity] completed successfully in ? seconds -XX of XX: [@azure/search] completed successfully in ? seconds -XX of XX: [@azure/service-bus] completed successfully in ? seconds -XX of XX: [@azure/storage-file-datalake] completed successfully in ? seconds -XX of XX: [@azure/storage-file-share] completed successfully in ? seconds -XX of XX: [@azure/storage-queue] completed successfully in ? seconds -XX of XX: [@azure/template] completed successfully in ? seconds -XX of XX: [testhub] completed successfully in ? seconds -SUCCESS (26) +SUCCESS (1) ================================ -@azure/abort-controller (? seconds) -@azure/core-auth (? seconds) @azure/logger (? seconds) -@azure/core-asynciterator-polyfill (? seconds) -@azure/core-http (? seconds) -@azure/core-amqp (? seconds) -@azure/core-lro (? seconds) -@azure/core-paging (? seconds) -@azure/test-utils-recorder (? seconds) -@azure/eslint-plugin-azure-sdk (? seconds) -@azure/event-hubs (? seconds) -@azure/event-processor-host (? seconds) -@azure/storage-blob (? seconds) -@azure/ai-text-analytics (? seconds) -@azure/app-configuration (? seconds) -@azure/core-arm (? seconds) -@azure/core-tracing (? seconds) -@azure/eventhubs-checkpointstore-blob (? seconds) -@azure/identity (? seconds) -@azure/search (? seconds) -@azure/service-bus (? seconds) -@azure/storage-file-datalake (? seconds) -@azure/storage-file-share (? seconds) -@azure/storage-queue (? seconds) -@azure/template (? seconds) -testhub (? seconds) ================================ -SUCCESS WITH WARNINGS (1) -================================ -@azure/cosmos (? seconds) -dist-esm/index.js → dist/index.js... -(!) Unresolved dependencies -https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency -os-name (imported by dist-esm/utils/user-agent.js) -(!) Missing global variable name -Use output.globals to specify browser global variable names corresponding to external modules -os-name (guessing 'osName') -created dist/index.js in ?s -================================ -BLOCKED (1) +BLOCKED (49) ================================ +@azure/abort-controller +@azure/core-auth +@azure/core-asynciterator-polyfill +@azure/core-http +@azure/communication-common +@azure/core-amqp +@azure/core-lro +@azure/core-paging +@azure/dev-tool +@azure/test-utils-recorder +@azure/communication-administration +@azure/core-https +@azure/core-xml +@azure/event-hubs +@azure/event-processor-host +@azure/keyvault-secrets +@azure/storage-blob +@azure/ai-anomaly-detector +@azure/ai-form-recognizer +@azure/ai-text-analytics +@azure/app-configuration +@azure/communication-chat +@azure/communication-sms +@azure/core-arm +@azure/core-client +@azure/core-tracing +@azure/cosmos +@azure/data-tables +@azure/digital-twins +@azure/eventgrid +@azure/eventhubs-checkpointstore-blob +@azure/identity +@azure/keyvault-admin @azure/keyvault-certificates +@azure/keyvault-common +@azure/keyvault-keys +@azure/monitor-opentelemetry-exporter +@azure/schema-registry +@azure/schema-registry-avro +@azure/search-documents +@azure/service-bus +@azure/storage-blob-changefeed +@azure/storage-file-datalake +@azure/storage-file-share +@azure/storage-internal-avro +@azure/storage-queue +@azure/template +@azure/test-utils-perfstress +testhub ================================ -FAILURE (2) +FAILURE (1) ================================ -@azure/keyvault-keys ( ? seconds) -npm ERR! code ELIFECYCLE -npm ERR! errno 2 -npm ERR! @azure/keyvault-keys@X.X.X-preview.2 extract-api: `tsc -p . && api-extractor run --local` -npm ERR! Exit status 2 -npm ERR! -npm ERR! Failed at the @azure/keyvault-keys@X.X.X-preview.2 extract-api script. -npm ERR! This is probably not a problem with npm. There is likely additional logging output above. -npm ERR! A complete log of this run can be found in: -npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log -@azure/keyvault-secrets ( ? seconds) -npm ERR! code ELIFECYCLE -npm ERR! errno 2 -npm ERR! @azure/keyvault-secrets@X.X.X-preview.2 extract-api: `tsc -p . && api-extractor run --local` -npm ERR! Exit status 2 -npm ERR! -npm ERR! Failed at the @azure/keyvault-secrets@X.X.X-preview.2 extract-api script. -npm ERR! This is probably not a problem with npm. There is likely additional logging output above. -npm ERR! A complete log of this run can be found in: -npm ERR! /root/.npm/_logs/XXXX-XX-XXXXXXXXX-debug.log +@azure/eslint-plugin-azure-sdk (? seconds) +>>> @azure/eslint-plugin-azure-sdk +tsc -p tsconfig.build.json && prettier --write dist/**/*.{js,json,md} +../../temp/node_modules/.pnpm/@typescript-eslint/experimental-utils@X.X.X_eslint@X.X.X+typescript@X.X.X/node_modules/@typescript-eslint/experimental-utils/dist/ts-eslint/Linter.d.ts:6:11 - error TS2300: Duplicate identifier 'Linter'. +6 interface Linter { + ~~~~~~ +../../temp/node_modules/.pnpm/@typescript-eslint/experimental-utils@X.X.X_eslint@X.X.X+typescript@X.X.X/node_modules/@typescript-eslint/experimental-utils/dist/ts-eslint/Linter.d.ts:21:19 - error TS2300: Duplicate identifier 'Linter'. +21 declare namespace Linter { + ~~~~~~ +../../temp/node_modules/.pnpm/@typescript-eslint/experimental-utils@X.X.X_eslint@X.X.X+typescript@X.X.X/node_modules/@typescript-eslint/experimental-utils/dist/ts-eslint/Linter.d.ts:106:15 - error TS2300: Duplicate identifier 'Linter'. +106 declare const Linter: new () => Linter; + ~~~~~~ +../../temp/node_modules/.pnpm/@typescript-eslint/typescript-estree@X.X.X_typescript@X.X.X/node_modules/@typescript-eslint/typescript-estree/dist/ts-estree/ts-nodes.d.ts:3:3999 - error TS2694: Namespace 'ts' has no exported member 'JSDocAuthorTag'. +3 export declare type TSNode = ts.Node & (ts.Modifier | ts.Identifier | ts.QualifiedName | ts.ComputedPropertyName | ts.Decorator | ts.TypeParameterDeclaration | ts.CallSignatureDeclaration | ts.ConstructSignatureDeclaration | ts.VariableDeclaration | ts.VariableDeclarationList | ts.ParameterDeclaration | ts.BindingElement | ts.PropertySignature | ts.PropertyDeclaration | ts.PropertyAssignment | ts.ShorthandPropertyAssignment | ts.SpreadAssignment | ts.ObjectBindingPattern | ts.ArrayBindingPattern | ts.FunctionDeclaration | ts.MethodSignature | ts.MethodDeclaration | ts.ConstructorDeclaration | ts.SemicolonClassElement | ts.GetAccessorDeclaration | ts.SetAccessorDeclaration | ts.IndexSignatureDeclaration | ts.KeywordTypeNode | ts.ImportTypeNode | ts.ThisTypeNode | ts.ConstructorTypeNode | ts.FunctionTypeNode | ts.TypeReferenceNode | ts.TypePredicateNode | ts.TypeQueryNode | ts.TypeLiteralNode | ts.ArrayTypeNode | ts.TupleTypeNode | ts.OptionalTypeNode | ts.RestTypeNode | ts.UnionTypeNode | ts.IntersectionTypeNode | ts.ConditionalTypeNode | ts.InferTypeNode | ts.ParenthesizedTypeNode | ts.TypeOperatorNode | ts.IndexedAccessTypeNode | ts.MappedTypeNode | ts.LiteralTypeNode | ts.StringLiteral | ts.OmittedExpression | ts.PartiallyEmittedExpression | ts.PrefixUnaryExpression | ts.PostfixUnaryExpression | ts.NullLiteral | ts.BooleanLiteral | ts.ThisExpression | ts.SuperExpression | ts.ImportExpression | ts.DeleteExpression | ts.TypeOfExpression | ts.VoidExpression | ts.AwaitExpression | ts.YieldExpression | ts.SyntheticExpression | ts.BinaryExpression | ts.ConditionalExpression | ts.FunctionExpression | ts.ArrowFunction | ts.RegularExpressionLiteral | ts.NoSubstitutionTemplateLiteral | ts.NumericLiteral | ts.BigIntLiteral | ts.TemplateHead | ts.TemplateMiddle | ts.TemplateTail | ts.TemplateExpression | ts.TemplateSpan | ts.ParenthesizedExpression | ts.ArrayLiteralExpression | ts.SpreadElement | ts.ObjectLiteralExpression | ts.PropertyAccessExpression | ts.ElementAccessExpression | ts.CallExpression | ts.ExpressionWithTypeArguments | ts.NewExpression | ts.TaggedTemplateExpression | ts.AsExpression | ts.TypeAssertion | ts.NonNullExpression | ts.MetaProperty | ts.JsxElement | ts.JsxOpeningElement | ts.JsxSelfClosingElement | ts.JsxFragment | ts.JsxOpeningFragment | ts.JsxClosingFragment | ts.JsxAttribute | ts.JsxSpreadAttribute | ts.JsxClosingElement | ts.JsxExpression | ts.JsxText | ts.NotEmittedStatement | ts.CommaListExpression | ts.EmptyStatement | ts.DebuggerStatement | ts.MissingDeclaration | ts.Block | ts.VariableStatement | ts.ExpressionStatement | ts.IfStatement | ts.DoStatement | ts.WhileStatement | ts.ForStatement | ts.ForInStatement | ts.ForOfStatement | ts.BreakStatement | ts.ContinueStatement | ts.ReturnStatement | ts.WithStatement | ts.SwitchStatement | ts.CaseBlock | ts.CaseClause | ts.DefaultClause | ts.LabeledStatement | ts.ThrowStatement | ts.TryStatement | ts.CatchClause | ts.ClassDeclaration | ts.ClassExpression | ts.InterfaceDeclaration | ts.HeritageClause | ts.TypeAliasDeclaration | ts.EnumMember | ts.EnumDeclaration | ts.ModuleDeclaration | ts.ModuleBlock | ts.ImportEqualsDeclaration | ts.ExternalModuleReference | ts.ImportDeclaration | ts.ImportClause | ts.NamespaceImport | ts.NamespaceExportDeclaration | ts.ExportDeclaration | ts.NamedImports | ts.NamedExports | ts.ImportSpecifier | ts.ExportSpecifier | ts.ExportAssignment | ts.CommentRange | ts.SourceFile | ts.Bundle | ts.InputFiles | ts.UnparsedSource | ts.JsonMinusNumericLiteral | ts.JSDoc | ts.JSDocTypeExpression | ts.JSDocUnknownTag | ts.JSDocAugmentsTag | ts.JSDocClassTag | ts.JSDocEnumTag | ts.JSDocThisTag | ts.JSDocTemplateTag | ts.JSDocReturnTag | ts.JSDocTypeTag | ts.JSDocTypedefTag | ts.JSDocCallbackTag | ts.JSDocSignature | ts.JSDocPropertyTag | ts.JSDocParameterTag | ts.JSDocTypeLiteral | ts.JSDocFunctionType | ts.JSDocAllType | ts.JSDocUnknownType | ts.JSDocNullableType | ts.JSDocNonNullableType | ts.JSDocOptionalType | ts.JSDocVariadicType | ts.JSDocAuthorTag); + ~~~~~~~~~~~~~~ +Found 4 errors. ================================ Error: Project(s) failed -rush rebuild - Errors! ( ? seconds) +rush rebuild - Errors! (? seconds) Standard error: -XX of XX: [@azure/keyvault-keys] failed! -XX of XX: [@azure/keyvault-certificates] blocked by [@azure/keyvault-keys]! -XX of XX: [@azure/keyvault-secrets] failed! -XX of XX: [@azure/cosmos] completed with warnings in ? seconds -[@azure/keyvault-keys] Returned error code: 2 -[@azure/keyvault-secrets] Returned error code: 2 +XX of XX: [@azure/eslint-plugin-azure-sdk] failed! +XX of XX: [@azure/abort-controller] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/communication-chat] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/communication-common] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/communication-administration] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/communication-sms] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/core-amqp] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/event-hubs] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/eventhubs-checkpointstore-blob] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/service-bus] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/core-auth] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/ai-anomaly-detector] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/ai-form-recognizer] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/ai-text-analytics] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/core-client] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/core-http] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/app-configuration] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/core-arm] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/core-lro] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/keyvault-admin] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/keyvault-certificates] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/keyvault-keys] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/keyvault-secrets] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/storage-blob] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/storage-blob-changefeed] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/storage-file-datalake] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/data-tables] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/digital-twins] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/eventgrid] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/identity] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/keyvault-common] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/monitor-opentelemetry-exporter] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/schema-registry] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/schema-registry-avro] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/search-documents] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/storage-file-share] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/storage-queue] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/template] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/test-utils-perfstress] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/test-utils-recorder] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/storage-internal-avro] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/core-https] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/core-asynciterator-polyfill] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/core-paging] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/core-tracing] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/core-xml] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/cosmos] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/dev-tool] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [@azure/event-processor-host] blocked by [@azure/eslint-plugin-azure-sdk]! +XX of XX: [testhub] blocked by [@azure/eslint-plugin-azure-sdk]! +[@azure/eslint-plugin-azure-sdk] Returned error code: 2 diff --git a/tests/baselines/reference/docker/office-ui-fabric.log b/tests/baselines/reference/docker/office-ui-fabric.log index 4d3d4e64ba7..da84b91bcb4 100644 --- a/tests/baselines/reference/docker/office-ui-fabric.log +++ b/tests/baselines/reference/docker/office-ui-fabric.log @@ -1,782 +1,829 @@ Exit Code: 1 Standard output: -@uifabric/tslint-rules: yarn run vX.X.X -@uifabric/tslint-rules: $ just-scripts build -@uifabric/tslint-rules: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] -@uifabric/tslint-rules: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/tslint-rules/tsconfig.json -@uifabric/tslint-rules: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/tslint-rules/tsconfig.json" -@uifabric/tslint-rules: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/tslint-rules/tsconfig.json -@uifabric/tslint-rules: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/tslint-rules/tsconfig.json" -@uifabric/tslint-rules: Done in ?s. +@fluentui/eslint-plugin: yarn run vX.X.X +@fluentui/eslint-plugin: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/eslint-plugin: Done in ?s. +@fluentui/noop: yarn run vX.X.X +@fluentui/noop: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/noop: Done in ?s. +@fluentui/web-components: yarn run vX.X.X +@fluentui/web-components: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/web-components: Done in ?s. @fluentui/ability-attributes: yarn run vX.X.X -@fluentui/ability-attributes: $ npm run schema && gulp bundle:package:no-umd -@fluentui/ability-attributes: > @fluentui/ability-attributes@X.X.X schema /office-ui-fabric-react/packages/fluentui/ability-attributes -@fluentui/ability-attributes: > allyschema -c "process.env.NODE_ENV !== 'production'" schema.json > ./src/schema.ts -@fluentui/ability-attributes: [XX:XX:XX] Requiring external module @uifabric/build/babel/register -@fluentui/ability-attributes: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/packages/fluentui/ability-attributes/gulpfile.ts +@fluentui/ability-attributes: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/ability-attributes: Done in ?s. @fluentui/digest: yarn run vX.X.X -@fluentui/digest: $ just-scripts build +@fluentui/digest: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/digest: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/fluentui/digest/tsconfig.json @fluentui/digest: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --module esnext --outDir lib --project "/office-ui-fabric-react/packages/fluentui/digest/tsconfig.json" -@fluentui/digest: [XX:XX:XX XM] ■ Running Webpack -@fluentui/digest: [XX:XX:XX XM] ■ Webpack Config Path: null -@fluentui/digest: [XX:XX:XX XM] ■ webpack.config.js not found, skipping webpack @fluentui/digest: Done in ?s. @uifabric/build: yarn run vX.X.X -@uifabric/build: $ node ./just-scripts.js no-op -@uifabric/build: Done in ?s. +@uifabric/build: $ /office-ui-fabric-react/node_modules/.bin/just ts +@uifabric/build: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/scripts/tsconfig.json +@uifabric/build: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/scripts/tsconfig.json" +@uifabric/build: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/scripts/tsconfig.json +@uifabric/build: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/scripts/tsconfig.json" +@uifabric/build: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@uifabric/pr-deploy-site: yarn run vX.X.X +@uifabric/pr-deploy-site: $ just-scripts ts +@uifabric/pr-deploy-site: Done in ?s. +@fluentui/a11y-rules: yarn run vX.X.X +@fluentui/a11y-rules: $ just-scripts ts +@fluentui/a11y-rules: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/a11y-rules/tsconfig.json +@fluentui/a11y-rules: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/a11y-rules/tsconfig.json" +@fluentui/a11y-rules: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/a11y-rules/tsconfig.json +@fluentui/a11y-rules: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/a11y-rules/tsconfig.json" +@fluentui/a11y-rules: Done in ?s. +@fluentui/common-styles: yarn run vX.X.X +@fluentui/common-styles: $ just-scripts ts +@fluentui/common-styles: Done in ?s. @uifabric/example-data: yarn run vX.X.X -@uifabric/example-data: $ just-scripts build -@uifabric/example-data: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] +@uifabric/example-data: $ just-scripts ts @uifabric/example-data: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/example-data/tsconfig.json @uifabric/example-data: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/example-data/tsconfig.json" @uifabric/example-data: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/example-data/tsconfig.json @uifabric/example-data: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/example-data/tsconfig.json" -@uifabric/example-data: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/example-data/lib/index.d.ts' @uifabric/example-data: Done in ?s. +@fluentui/ie11-polyfills: yarn run vX.X.X +@fluentui/ie11-polyfills: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/ie11-polyfills: Done in ?s. @fluentui/keyboard-key: yarn run vX.X.X -@fluentui/keyboard-key: $ just-scripts build -@fluentui/keyboard-key: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] +@fluentui/keyboard-key: $ just-scripts ts @fluentui/keyboard-key: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/keyboard-key/tsconfig.json @fluentui/keyboard-key: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/keyboard-key/tsconfig.json" @fluentui/keyboard-key: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/keyboard-key/tsconfig.json @fluentui/keyboard-key: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/keyboard-key/tsconfig.json" -@fluentui/keyboard-key: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/keyboard-key/lib/index.d.ts' @fluentui/keyboard-key: Done in ?s. -@uifabric/migration: yarn run vX.X.X -@uifabric/migration: $ just-scripts build -@uifabric/migration: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] -@uifabric/migration: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/packages/migration/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/migration/tsconfig.json -@uifabric/migration: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/packages/migration/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module commonjs --project "/office-ui-fabric-react/packages/migration/tsconfig.json" -@uifabric/migration: Done in ?s. @uifabric/monaco-editor: yarn run vX.X.X -@uifabric/monaco-editor: $ just-scripts build -@uifabric/monaco-editor: [XX:XX:XX XM] ■ Removing [esm, lib, lib-commonjs] +@uifabric/monaco-editor: $ just-scripts ts @uifabric/monaco-editor: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/monaco-editor/tsconfig.json @uifabric/monaco-editor: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/monaco-editor/tsconfig.json" @uifabric/monaco-editor: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/monaco-editor/tsconfig.json @uifabric/monaco-editor: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/monaco-editor/tsconfig.json" @uifabric/monaco-editor: Done in ?s. +@fluentui/react-conformance: yarn run vX.X.X +@fluentui/react-conformance: $ just-scripts ts +@fluentui/react-conformance: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-conformance/tsconfig.json +@fluentui/react-conformance: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-conformance/tsconfig.json" +@fluentui/react-conformance: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-conformance/tsconfig.json +@fluentui/react-conformance: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-conformance/tsconfig.json" +@fluentui/react-conformance: Done in ?s. @uifabric/set-version: yarn run vX.X.X -@uifabric/set-version: $ just-scripts build -@uifabric/set-version: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] +@uifabric/set-version: $ just-scripts ts @uifabric/set-version: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/set-version/tsconfig.json @uifabric/set-version: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/set-version/tsconfig.json" @uifabric/set-version: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/set-version/tsconfig.json @uifabric/set-version: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/set-version/tsconfig.json" @uifabric/set-version: Done in ?s. @uifabric/webpack-utils: yarn run vX.X.X -@uifabric/webpack-utils: $ just-scripts build -@uifabric/webpack-utils: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] +@uifabric/webpack-utils: $ just-scripts ts @uifabric/webpack-utils: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/webpack-utils/tsconfig.json -@uifabric/webpack-utils: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module commonjs --project "/office-ui-fabric-react/packages/webpack-utils/tsconfig.json" -@uifabric/webpack-utils: Done in ?s. +@uifabric/webpack-utils: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/webpack-utils/tsconfig.json" +@uifabric/webpack-utils: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/webpack-utils/tsconfig.json +@uifabric/webpack-utils: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/webpack-utils/tsconfig.json" +@uifabric/webpack-utils: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/docs-components: yarn run vX.X.X -@fluentui/docs-components: $ gulp bundle:package:no-umd -@fluentui/docs-components: [XX:XX:XX] Requiring external module @uifabric/build/babel/register -@fluentui/docs-components: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/packages/fluentui/docs-components/gulpfile.ts +@fluentui/docs-components: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/docs-components: Done in ?s. @fluentui/react-component-event-listener: yarn run vX.X.X -@fluentui/react-component-event-listener: $ gulp bundle:package:no-umd -@fluentui/react-component-event-listener: [XX:XX:XX] Requiring external module @uifabric/build/babel/register -@fluentui/react-component-event-listener: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/packages/fluentui/react-component-event-listener/gulpfile.ts +@fluentui/react-component-event-listener: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/react-component-event-listener: Done in ?s. @fluentui/react-component-nesting-registry: yarn run vX.X.X -@fluentui/react-component-nesting-registry: $ gulp bundle:package:no-umd -@fluentui/react-component-nesting-registry: [XX:XX:XX] Requiring external module @uifabric/build/babel/register -@fluentui/react-component-nesting-registry: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/packages/fluentui/react-component-nesting-registry/gulpfile.ts +@fluentui/react-component-nesting-registry: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/react-component-nesting-registry: Done in ?s. @fluentui/react-component-ref: yarn run vX.X.X -@fluentui/react-component-ref: $ gulp bundle:package:no-umd -@fluentui/react-component-ref: [XX:XX:XX] Requiring external module @uifabric/build/babel/register -@fluentui/react-component-ref: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/packages/fluentui/react-component-ref/gulpfile.ts +@fluentui/react-component-ref: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/react-component-ref: Done in ?s. @fluentui/react-context-selector: yarn run vX.X.X -@fluentui/react-context-selector: $ gulp bundle:package:no-umd -@fluentui/react-context-selector: [XX:XX:XX] Requiring external module @uifabric/build/babel/register -@fluentui/react-context-selector: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/packages/fluentui/react-context-selector/gulpfile.ts +@fluentui/react-context-selector: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/react-context-selector: Done in ?s. @fluentui/react-proptypes: yarn run vX.X.X -@fluentui/react-proptypes: $ gulp bundle:package:no-umd -@fluentui/react-proptypes: [XX:XX:XX] Requiring external module @uifabric/build/babel/register -@fluentui/react-proptypes: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/packages/fluentui/react-proptypes/gulpfile.ts +@fluentui/react-proptypes: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/react-proptypes: Done in ?s. @fluentui/state: yarn run vX.X.X -@fluentui/state: $ gulp bundle:package:no-umd -@fluentui/state: [XX:XX:XX] Requiring external module @uifabric/build/babel/register -@fluentui/state: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/packages/fluentui/state/gulpfile.ts +@fluentui/state: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/state: Done in ?s. @fluentui/styles: yarn run vX.X.X -@fluentui/styles: $ gulp bundle:package:no-umd -@fluentui/styles: [XX:XX:XX] Requiring external module @uifabric/build/babel/register -@fluentui/styles: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/packages/fluentui/styles/gulpfile.ts +@fluentui/styles: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/styles: Done in ?s. +@fluentui/a11y-testing: yarn run vX.X.X +@fluentui/a11y-testing: $ just-scripts ts +@fluentui/a11y-testing: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/a11y-testing/tsconfig.json +@fluentui/a11y-testing: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/a11y-testing/tsconfig.json" +@fluentui/a11y-testing: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/a11y-testing/tsconfig.json +@fluentui/a11y-testing: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/a11y-testing/tsconfig.json" +@fluentui/a11y-testing: Done in ?s. @fluentui/accessibility: yarn run vX.X.X -@fluentui/accessibility: $ gulp bundle:package:no-umd -@fluentui/accessibility: [XX:XX:XX] Requiring external module @uifabric/build/babel/register -@fluentui/accessibility: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/packages/fluentui/accessibility/gulpfile.ts +@fluentui/accessibility: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/accessibility: Done in ?s. @fluentui/date-time-utilities: yarn run vX.X.X -@fluentui/date-time-utilities: $ just-scripts build -@fluentui/date-time-utilities: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] +@fluentui/date-time-utilities: $ just-scripts ts @fluentui/date-time-utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/date-time-utilities/tsconfig.json @fluentui/date-time-utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/date-time-utilities/tsconfig.json" @fluentui/date-time-utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/date-time-utilities/tsconfig.json @fluentui/date-time-utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/date-time-utilities/tsconfig.json" -@fluentui/date-time-utilities: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/date-time-utilities/lib/index.d.ts' @fluentui/date-time-utilities: Done in ?s. +@fluentui/dom-utilities: yarn run vX.X.X +@fluentui/dom-utilities: $ just-scripts ts +@fluentui/dom-utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/dom-utilities/tsconfig.json +@fluentui/dom-utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/dom-utilities/tsconfig.json" +@fluentui/dom-utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/dom-utilities/tsconfig.json +@fluentui/dom-utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/dom-utilities/tsconfig.json" +@fluentui/dom-utilities: Done in ?s. @uifabric/merge-styles: yarn run vX.X.X -@uifabric/merge-styles: $ just-scripts build -@uifabric/merge-styles: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] +@uifabric/merge-styles: $ just-scripts ts @uifabric/merge-styles: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/merge-styles/tsconfig.json @uifabric/merge-styles: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/merge-styles/tsconfig.json" @uifabric/merge-styles: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/merge-styles/tsconfig.json @uifabric/merge-styles: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/merge-styles/tsconfig.json" -@uifabric/merge-styles: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/merge-styles/lib/index.d.ts' -@uifabric/merge-styles: Done in ?s. +@uifabric/merge-styles: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/react-northstar-styles-renderer: yarn run vX.X.X -@fluentui/react-northstar-styles-renderer: $ gulp bundle:package:no-umd -@fluentui/react-northstar-styles-renderer: [XX:XX:XX] Requiring external module @uifabric/build/babel/register -@fluentui/react-northstar-styles-renderer: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/packages/fluentui/react-northstar-styles-renderer/gulpfile.ts +@fluentui/react-northstar-styles-renderer: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/react-northstar-styles-renderer: Done in ?s. @uifabric/jest-serializer-merge-styles: yarn run vX.X.X -@uifabric/jest-serializer-merge-styles: $ just-scripts build -@uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] +@uifabric/jest-serializer-merge-styles: $ just-scripts ts @uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/jest-serializer-merge-styles/tsconfig.json @uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/jest-serializer-merge-styles/tsconfig.json" @uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/jest-serializer-merge-styles/tsconfig.json @uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/jest-serializer-merge-styles/tsconfig.json" @uifabric/jest-serializer-merge-styles: Done in ?s. @fluentui/react-northstar-emotion-renderer: yarn run vX.X.X -@fluentui/react-northstar-emotion-renderer: $ gulp bundle:package:no-umd -@fluentui/react-northstar-emotion-renderer: [XX:XX:XX] Requiring external module @uifabric/build/babel/register -@fluentui/react-northstar-emotion-renderer: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/packages/fluentui/react-northstar-emotion-renderer/gulpfile.ts +@fluentui/react-northstar-emotion-renderer: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/react-northstar-emotion-renderer: Done in ?s. @fluentui/react-northstar-fela-renderer: yarn run vX.X.X -@fluentui/react-northstar-fela-renderer: $ gulp bundle:package:no-umd -@fluentui/react-northstar-fela-renderer: [XX:XX:XX] Requiring external module @uifabric/build/babel/register -@fluentui/react-northstar-fela-renderer: [XX:XX:XX] Using gulpfile /office-ui-fabric-react/packages/fluentui/react-northstar-fela-renderer/gulpfile.ts +@fluentui/react-northstar-fela-renderer: $ /office-ui-fabric-react/node_modules/.bin/just ts @fluentui/react-northstar-fela-renderer: Done in ?s. @fluentui/react-stylesheets: yarn run vX.X.X -@fluentui/react-stylesheets: $ just-scripts build -@fluentui/react-stylesheets: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] +@fluentui/react-stylesheets: $ just-scripts ts @fluentui/react-stylesheets: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-stylesheets/tsconfig.json @fluentui/react-stylesheets: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-stylesheets/tsconfig.json" @fluentui/react-stylesheets: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-stylesheets/tsconfig.json @fluentui/react-stylesheets: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-stylesheets/tsconfig.json" -@fluentui/react-stylesheets: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/react-stylesheets/lib/index.d.ts' @fluentui/react-stylesheets: Done in ?s. +@fluentui/react-utilities: yarn run vX.X.X +@fluentui/react-utilities: $ just-scripts ts +@fluentui/react-utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-utilities/tsconfig.json +@fluentui/react-utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-utilities/tsconfig.json" +@fluentui/react-utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-utilities/tsconfig.json +@fluentui/react-utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-utilities/tsconfig.json" +@fluentui/react-utilities: Done in ?s. @uifabric/test-utilities: yarn run vX.X.X -@uifabric/test-utilities: $ just-scripts build -@uifabric/test-utilities: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] +@uifabric/test-utilities: $ just-scripts ts @uifabric/test-utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/test-utilities/tsconfig.json @uifabric/test-utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/test-utilities/tsconfig.json" @uifabric/test-utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/test-utilities/tsconfig.json @uifabric/test-utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/test-utilities/tsconfig.json" @uifabric/test-utilities: Done in ?s. +@fluentui/react-window-provider: yarn run vX.X.X +@fluentui/react-window-provider: $ just-scripts ts +@fluentui/react-window-provider: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-window-provider/tsconfig.json +@fluentui/react-window-provider: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-window-provider/tsconfig.json" +@fluentui/react-window-provider: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-window-provider/tsconfig.json +@fluentui/react-window-provider: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-window-provider/tsconfig.json" +@fluentui/react-window-provider: Done in ?s. @uifabric/utilities: yarn run vX.X.X -@uifabric/utilities: $ just-scripts build -@uifabric/utilities: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] +@uifabric/utilities: $ just-scripts ts @uifabric/utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/utilities/tsconfig.json @uifabric/utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/utilities/tsconfig.json" @uifabric/utilities: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/utilities/tsconfig.json @uifabric/utilities: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/utilities/tsconfig.json" -@uifabric/utilities: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/utilities/lib/index.d.ts' -@uifabric/utilities: Done in ?s. +@uifabric/utilities: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. @fluentui/react-compose: yarn run vX.X.X -@fluentui/react-compose: $ just-scripts build -@fluentui/react-compose: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] +@fluentui/react-compose: $ just-scripts ts @fluentui/react-compose: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-compose/tsconfig.json @fluentui/react-compose: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-compose/tsconfig.json" @fluentui/react-compose: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-compose/tsconfig.json @fluentui/react-compose: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-compose/tsconfig.json" -@fluentui/react-compose: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/react-compose/lib/index.d.ts' @fluentui/react-compose: Done in ?s. @uifabric/react-hooks: yarn run vX.X.X -@uifabric/react-hooks: $ just-scripts build -@uifabric/react-hooks: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] +@uifabric/react-hooks: $ just-scripts ts @uifabric/react-hooks: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-hooks/tsconfig.json @uifabric/react-hooks: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-hooks/tsconfig.json" @uifabric/react-hooks: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-hooks/tsconfig.json @uifabric/react-hooks: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-hooks/tsconfig.json" -@uifabric/react-hooks: [XX:XX:XX XM] ■ Extracting Public API surface from '/office-ui-fabric-react/packages/react-hooks/lib/index.d.ts' @uifabric/react-hooks: Done in ?s. @fluentui/react-icons: yarn run vX.X.X -@fluentui/react-icons: $ just-scripts build -@fluentui/react-icons: [XX:XX:XX XM] ■ Removing [lib, temp, dist, lib-amd, lib-commonjs, lib-es2015, coverage, src/**/*.scss.ts] +@fluentui/react-icons: $ just-scripts ts @fluentui/react-icons: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-icons/tsconfig.json @fluentui/react-icons: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-icons/tsconfig.json" @fluentui/react-icons: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-icons/tsconfig.json @fluentui/react-icons: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-icons/tsconfig.json" @fluentui/react-icons: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/theme: yarn run vX.X.X +@fluentui/theme: $ just-scripts ts +@fluentui/theme: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/theme/tsconfig.json +@fluentui/theme: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/theme/tsconfig.json" +@fluentui/theme: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/theme/tsconfig.json +@fluentui/theme: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/theme/tsconfig.json" +@fluentui/theme: Done in ?s. +@fluentui/react-bindings: yarn run vX.X.X +@fluentui/react-bindings: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/react-bindings: Done in ?s. +@uifabric/styling: yarn run vX.X.X +@uifabric/styling: $ just-scripts ts +@uifabric/styling: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/styling/tsconfig.json +@uifabric/styling: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/styling/tsconfig.json" +@uifabric/styling: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/styling/tsconfig.json +@uifabric/styling: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/styling/tsconfig.json" +@uifabric/styling: Done in ?s. +@fluentui/react-icons-northstar: yarn run vX.X.X +@fluentui/react-icons-northstar: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/react-icons-northstar: Done in ?s. +@fluentui/react-telemetry: yarn run vX.X.X +@fluentui/react-telemetry: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/react-telemetry: Done in ?s. +@uifabric/file-type-icons: yarn run vX.X.X +@uifabric/file-type-icons: $ just-scripts ts +@uifabric/file-type-icons: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/file-type-icons/tsconfig.json +@uifabric/file-type-icons: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/file-type-icons/tsconfig.json" +@uifabric/file-type-icons: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/file-type-icons/tsconfig.json +@uifabric/file-type-icons: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/file-type-icons/tsconfig.json" +@uifabric/file-type-icons: Done in ?s. +@uifabric/foundation: yarn run vX.X.X +@uifabric/foundation: $ just-scripts ts +@uifabric/foundation: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/foundation/tsconfig.json +@uifabric/foundation: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/foundation/tsconfig.json" +@uifabric/foundation: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/foundation/tsconfig.json +@uifabric/foundation: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/foundation/tsconfig.json" +@uifabric/foundation: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@uifabric/icons: yarn run vX.X.X +@uifabric/icons: $ just-scripts ts +@uifabric/icons: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/icons/tsconfig.json +@uifabric/icons: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/icons/tsconfig.json" +@uifabric/icons: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/icons/tsconfig.json +@uifabric/icons: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/icons/tsconfig.json" +@uifabric/icons: Done in ?s. +@fluentui/react-focus: yarn run vX.X.X +@fluentui/react-focus: $ just-scripts ts +@fluentui/react-focus: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-focus/tsconfig.json +@fluentui/react-focus: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-focus/tsconfig.json" +@fluentui/react-focus: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-focus/tsconfig.json +@fluentui/react-focus: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-focus/tsconfig.json" +@fluentui/react-focus: Done in ?s. +@fluentui/react-theme-provider: yarn run vX.X.X +@fluentui/react-theme-provider: $ just-scripts ts +@fluentui/react-theme-provider: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-theme-provider/tsconfig.json +@fluentui/react-theme-provider: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-theme-provider/tsconfig.json" +@fluentui/react-theme-provider: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-theme-provider/tsconfig.json +@fluentui/react-theme-provider: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-theme-provider/tsconfig.json" +@fluentui/react-theme-provider: Done in ?s. +@fluentui/react-northstar: yarn run vX.X.X +@fluentui/react-northstar: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/react-northstar: Done in ?s. +office-ui-fabric-react: yarn run vX.X.X +office-ui-fabric-react: $ just-scripts ts +office-ui-fabric-react: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/office-ui-fabric-react/tsconfig.json +office-ui-fabric-react: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/office-ui-fabric-react/tsconfig.json" +office-ui-fabric-react: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/office-ui-fabric-react/tsconfig.json +office-ui-fabric-react: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/office-ui-fabric-react/tsconfig.json" +office-ui-fabric-react: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/circulars-test: yarn run vX.X.X +@fluentui/circulars-test: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/circulars-test: Done in ?s. +@fluentui/code-sandbox: yarn run vX.X.X +@fluentui/code-sandbox: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/code-sandbox: Done in ?s. +@fluentui/local-sandbox: yarn run vX.X.X +@fluentui/local-sandbox: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/local-sandbox: Done in ?s. +@fluentui/projects-test: yarn run vX.X.X +@fluentui/projects-test: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/projects-test: Done in ?s. +server-rendered-app: yarn run vX.X.X +server-rendered-app: $ just-scripts ts +server-rendered-app: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/server-rendered-app/tsconfig.json +server-rendered-app: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/server-rendered-app/tsconfig.json" +server-rendered-app: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/server-rendered-app/tsconfig.json +server-rendered-app: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/server-rendered-app/tsconfig.json" +server-rendered-app: Done in ?s. +todo-app: yarn run vX.X.X +todo-app: $ just-scripts ts +todo-app: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/todo-app/tsconfig.json +todo-app: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/todo-app/tsconfig.json" +todo-app: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/todo-app/tsconfig.json +todo-app: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/todo-app/tsconfig.json" +todo-app: Done in ?s. +@uifabric/azure-themes: yarn run vX.X.X +@uifabric/azure-themes: $ just-scripts ts +@uifabric/azure-themes: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/azure-themes/tsconfig.json +@uifabric/azure-themes: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/azure-themes/tsconfig.json" +@uifabric/azure-themes: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/azure-themes/tsconfig.json +@uifabric/azure-themes: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/azure-themes/tsconfig.json" +@uifabric/azure-themes: Done in ?s. +@fluentui/codemods: yarn run vX.X.X +@fluentui/codemods: $ just-scripts ts +@fluentui/codemods: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/codemods/tsconfig.json +@fluentui/codemods: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/codemods/tsconfig.json" +@fluentui/codemods: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/codemods/tsconfig.json +@fluentui/codemods: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/codemods/tsconfig.json" +@fluentui/codemods: Done in ?s. +@fluentui/react: yarn run vX.X.X +@fluentui/react: $ just-scripts ts +@fluentui/react: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react/tsconfig.json +@fluentui/react: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react/tsconfig.json" +@fluentui/react: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react/tsconfig.json +@fluentui/react: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react/tsconfig.json" +@fluentui/react: Done in ?s. +@uifabric/tsx-editor: yarn run vX.X.X +@uifabric/tsx-editor: $ just-scripts ts +@uifabric/tsx-editor: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/tsx-editor/tsconfig.json +@uifabric/tsx-editor: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/tsx-editor/tsconfig.json" +@uifabric/tsx-editor: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/tsx-editor/tsconfig.json +@uifabric/tsx-editor: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/tsx-editor/tsconfig.json" +@uifabric/tsx-editor: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@uifabric/variants: yarn run vX.X.X +@uifabric/variants: $ just-scripts ts +@uifabric/variants: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/variants/tsconfig.json +@uifabric/variants: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/variants/tsconfig.json" +@uifabric/variants: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/variants/tsconfig.json +@uifabric/variants: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/variants/tsconfig.json" +@uifabric/variants: Done in ?s. +@fluentui/e2e: yarn run vX.X.X +@fluentui/e2e: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/e2e: Done in ?s. +@fluentui/perf-test: yarn run vX.X.X +@fluentui/perf-test: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/perf-test: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/fluentui/perf-test/tsconfig.json +@fluentui/perf-test: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/fluentui/perf-test/tsconfig.json" +@fluentui/perf-test: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/fluentui/perf-test/tsconfig.json +@fluentui/perf-test: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/fluentui/perf-test/tsconfig.json" +@fluentui/perf-test: Done in ?s. +codesandbox-react-northstar-template: yarn run vX.X.X +codesandbox-react-northstar-template: $ just-scripts ts +codesandbox-react-northstar-template: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/codesandbox-react-northstar-template/tsconfig.json +codesandbox-react-northstar-template: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/codesandbox-react-northstar-template/tsconfig.json" +codesandbox-react-northstar-template: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/codesandbox-react-northstar-template/tsconfig.json +codesandbox-react-northstar-template: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/codesandbox-react-northstar-template/tsconfig.json" +codesandbox-react-northstar-template: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/react-builder: yarn run vX.X.X +@fluentui/react-builder: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/react-builder: Done in ?s. +codesandbox-react-template: yarn run vX.X.X +codesandbox-react-template: $ just-scripts ts +codesandbox-react-template: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/codesandbox-react-template/tsconfig.json +codesandbox-react-template: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/codesandbox-react-template/tsconfig.json" +codesandbox-react-template: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/codesandbox-react-template/tsconfig.json +codesandbox-react-template: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/codesandbox-react-template/tsconfig.json" +codesandbox-react-template: Done in ?s. +@uifabric/fluent-theme: yarn run vX.X.X +@uifabric/fluent-theme: $ just-scripts ts +@uifabric/fluent-theme: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/fluent-theme/tsconfig.json +@uifabric/fluent-theme: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/fluent-theme/tsconfig.json" +@uifabric/fluent-theme: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/fluent-theme/tsconfig.json +@uifabric/fluent-theme: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/fluent-theme/tsconfig.json" +@uifabric/fluent-theme: Done in ?s. +@uifabric/mdl2-theme: yarn run vX.X.X +@uifabric/mdl2-theme: $ just-scripts ts +@uifabric/mdl2-theme: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/mdl2-theme/tsconfig.json +@uifabric/mdl2-theme: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/mdl2-theme/tsconfig.json" +@uifabric/mdl2-theme: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/mdl2-theme/tsconfig.json +@uifabric/mdl2-theme: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/mdl2-theme/tsconfig.json" +@uifabric/mdl2-theme: Done in ?s. +@uifabric/theme-samples: yarn run vX.X.X +@uifabric/theme-samples: $ just-scripts ts +@uifabric/theme-samples: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/theme-samples/tsconfig.json +@uifabric/theme-samples: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/theme-samples/tsconfig.json" +@uifabric/theme-samples: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/theme-samples/tsconfig.json +@uifabric/theme-samples: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/theme-samples/tsconfig.json" +@uifabric/theme-samples: Done in ?s. +@fluentui/docs: yarn run vX.X.X +@fluentui/docs: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/docs: Done in ?s. +@uifabric/example-app-base: yarn run vX.X.X +@uifabric/example-app-base: $ just-scripts ts +@uifabric/example-app-base: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/example-app-base/tsconfig.json +@uifabric/example-app-base: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/example-app-base/tsconfig.json" +@uifabric/example-app-base: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/example-app-base/tsconfig.json +@uifabric/example-app-base: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/example-app-base/tsconfig.json" +@uifabric/example-app-base: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/storybook: yarn run vX.X.X +@fluentui/storybook: $ just-scripts ts +@fluentui/storybook: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/storybook/tsconfig.json +@fluentui/storybook: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/storybook/tsconfig.json" +@fluentui/storybook: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/storybook/tsconfig.json +@fluentui/storybook: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/storybook/tsconfig.json" +@fluentui/storybook: Done in ?s. +@fluentui/perf: yarn run vX.X.X +@fluentui/perf: $ /office-ui-fabric-react/node_modules/.bin/just ts +@fluentui/perf: Done in ?s. +dom-tests: yarn run vX.X.X +dom-tests: $ just-scripts ts +dom-tests: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/dom-tests/tsconfig.json +dom-tests: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/dom-tests/tsconfig.json" +dom-tests: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/dom-tests/tsconfig.json +dom-tests: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/dom-tests/tsconfig.json" +dom-tests: Done in ?s. +@uifabric/charting: yarn run vX.X.X +@uifabric/charting: $ just-scripts ts +@uifabric/charting: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/charting/tsconfig.json +@uifabric/charting: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/charting/tsconfig.json" +@uifabric/charting: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/charting/tsconfig.json +@uifabric/charting: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/charting/tsconfig.json" +@uifabric/charting: Done in ?s. +@uifabric/date-time: yarn run vX.X.X +@uifabric/date-time: $ just-scripts ts +@uifabric/date-time: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/date-time/tsconfig.json +@uifabric/date-time: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/date-time/tsconfig.json" +@uifabric/date-time: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/date-time/tsconfig.json +@uifabric/date-time: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/date-time/tsconfig.json" +@uifabric/date-time: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@uifabric/experiments: yarn run vX.X.X +@uifabric/experiments: $ just-scripts ts +@uifabric/experiments: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/experiments/tsconfig.json +@uifabric/experiments: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/experiments/tsconfig.json" +@uifabric/experiments: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/experiments/tsconfig.json +@uifabric/experiments: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/experiments/tsconfig.json" +@uifabric/experiments: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@uifabric/react-cards: yarn run vX.X.X +@uifabric/react-cards: $ just-scripts ts +@uifabric/react-cards: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-cards/tsconfig.json +@uifabric/react-cards: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-cards/tsconfig.json" +@uifabric/react-cards: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-cards/tsconfig.json +@uifabric/react-cards: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-cards/tsconfig.json" +@uifabric/react-cards: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/react-avatar: yarn run vX.X.X +@fluentui/react-avatar: $ just-scripts ts +@fluentui/react-avatar: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-avatar/tsconfig.json +@fluentui/react-avatar: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-avatar/tsconfig.json" +@fluentui/react-avatar: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-avatar/tsconfig.json +@fluentui/react-avatar: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-avatar/tsconfig.json" +@fluentui/react-avatar: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/react-button: yarn run vX.X.X +@fluentui/react-button: $ just-scripts ts +@fluentui/react-button: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-button/tsconfig.json +@fluentui/react-button: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-button/tsconfig.json" +@fluentui/react-button: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-button/tsconfig.json +@fluentui/react-button: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-button/tsconfig.json" +@fluentui/react-button: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/react-checkbox: yarn run vX.X.X +@fluentui/react-checkbox: $ just-scripts ts +@fluentui/react-checkbox: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-checkbox/tsconfig.json +@fluentui/react-checkbox: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-checkbox/tsconfig.json" +@fluentui/react-checkbox: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-checkbox/tsconfig.json +@fluentui/react-checkbox: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-checkbox/tsconfig.json" +@fluentui/react-checkbox: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/react-image: yarn run vX.X.X +@fluentui/react-image: $ just-scripts ts +@fluentui/react-image: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-image/tsconfig.json +@fluentui/react-image: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-image/tsconfig.json" +@fluentui/react-image: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-image/tsconfig.json +@fluentui/react-image: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-image/tsconfig.json" +@fluentui/react-image: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/react-link: yarn run vX.X.X +@fluentui/react-link: $ just-scripts ts +@fluentui/react-link: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-link/tsconfig.json +@fluentui/react-link: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-link/tsconfig.json" +@fluentui/react-link: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-link/tsconfig.json +@fluentui/react-link: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-link/tsconfig.json" +@fluentui/react-link: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/react-slider: yarn run vX.X.X +@fluentui/react-slider: $ just-scripts ts +@fluentui/react-slider: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-slider/tsconfig.json +@fluentui/react-slider: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-slider/tsconfig.json" +@fluentui/react-slider: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-slider/tsconfig.json +@fluentui/react-slider: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-slider/tsconfig.json" +@fluentui/react-slider: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/react-spinbutton: yarn run vX.X.X +@fluentui/react-spinbutton: $ just-scripts ts +@fluentui/react-spinbutton: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-spinbutton/tsconfig.json +@fluentui/react-spinbutton: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-spinbutton/tsconfig.json" +@fluentui/react-spinbutton: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-spinbutton/tsconfig.json +@fluentui/react-spinbutton: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-spinbutton/tsconfig.json" +@fluentui/react-spinbutton: Done in ?s. +@fluentui/react-tabs: yarn run vX.X.X +@fluentui/react-tabs: $ just-scripts ts +@fluentui/react-tabs: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-tabs/tsconfig.json +@fluentui/react-tabs: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-tabs/tsconfig.json" +@fluentui/react-tabs: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-tabs/tsconfig.json +@fluentui/react-tabs: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-tabs/tsconfig.json" +@fluentui/react-tabs: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/react-toggle: yarn run vX.X.X +@fluentui/react-toggle: $ just-scripts ts +@fluentui/react-toggle: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-toggle/tsconfig.json +@fluentui/react-toggle: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-toggle/tsconfig.json" +@fluentui/react-toggle: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-toggle/tsconfig.json +@fluentui/react-toggle: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-toggle/tsconfig.json" +@fluentui/react-toggle: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +theming-designer: yarn run vX.X.X +theming-designer: $ just-scripts ts +theming-designer: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/theming-designer/tsconfig.json +theming-designer: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/theming-designer/tsconfig.json" +theming-designer: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/theming-designer/tsconfig.json +theming-designer: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/theming-designer/tsconfig.json" +theming-designer: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@uifabric/api-docs: yarn run vX.X.X +@uifabric/api-docs: $ just-scripts ts +@uifabric/api-docs: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/api-docs/tsconfig.json +@uifabric/api-docs: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/api-docs/tsconfig.json" +@uifabric/api-docs: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/api-docs/tsconfig.json +@uifabric/api-docs: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/api-docs/tsconfig.json" +@uifabric/api-docs: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/react-flex: yarn run vX.X.X +@fluentui/react-flex: $ just-scripts ts +@fluentui/react-flex: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-flex/tsconfig.json +@fluentui/react-flex: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-flex/tsconfig.json" +@fluentui/react-flex: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-flex/tsconfig.json +@fluentui/react-flex: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-flex/tsconfig.json" +@fluentui/react-flex: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@fluentui/react-next: yarn run vX.X.X +@fluentui/react-next: $ just-scripts ts +@fluentui/react-next: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-next/tsconfig.json +@fluentui/react-next: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-next/tsconfig.json" +@fluentui/react-next: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/react-next/tsconfig.json +@fluentui/react-next: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-next/tsconfig.json" +@fluentui/react-next: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +@uifabric/fabric-website-resources: yarn run vX.X.X +@uifabric/fabric-website-resources: $ just-scripts ts +@uifabric/fabric-website-resources: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/fabric-website-resources/tsconfig.json +@uifabric/fabric-website-resources: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/fabric-website-resources/tsconfig.json" +@uifabric/fabric-website-resources: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/fabric-website-resources/tsconfig.json +@uifabric/fabric-website-resources: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/fabric-website-resources/tsconfig.json" +@uifabric/fabric-website-resources: Done in ?s. +codesandbox-react-next-template: yarn run vX.X.X +codesandbox-react-next-template: $ just-scripts ts +codesandbox-react-next-template: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/codesandbox-react-next-template/tsconfig.json +codesandbox-react-next-template: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/codesandbox-react-next-template/tsconfig.json" +codesandbox-react-next-template: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/codesandbox-react-next-template/tsconfig.json +codesandbox-react-next-template: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/codesandbox-react-next-template/tsconfig.json" +codesandbox-react-next-template: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +perf-test: yarn run vX.X.X +perf-test: $ just-scripts ts +perf-test: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/perf-test/tsconfig.json +perf-test: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/perf-test/tsconfig.json" +perf-test: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/perf-test/tsconfig.json +perf-test: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/perf-test/tsconfig.json" +perf-test: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +test-bundles: yarn run vX.X.X +test-bundles: $ just-scripts ts +test-bundles: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/test-bundles/tsconfig.json +test-bundles: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/test-bundles/tsconfig.json" +test-bundles: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/test-bundles/tsconfig.json +test-bundles: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/test-bundles/tsconfig.json" +test-bundles: Done in ?s. +vr-tests: yarn run vX.X.X +vr-tests: $ just-scripts ts +vr-tests: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/vr-tests/tsconfig.json +vr-tests: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/vr-tests/tsconfig.json" +vr-tests: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/vr-tests/tsconfig.json +vr-tests: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/vr-tests/tsconfig.json" +vr-tests: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +a11y-tests: yarn run vX.X.X +a11y-tests: $ just-scripts ts +a11y-tests: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/a11y-tests/tsconfig.json +a11y-tests: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/a11y-tests/tsconfig.json" +a11y-tests: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/a11y-tests/tsconfig.json +a11y-tests: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/a11y-tests/tsconfig.json" +a11y-tests: Done in ?s. +@uifabric/fabric-website: yarn run vX.X.X +@uifabric/fabric-website: $ just-scripts ts +@uifabric/fabric-website: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/fabric-website/tsconfig.json +@uifabric/fabric-website: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/fabric-website/tsconfig.json" +@uifabric/fabric-website: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/apps/fabric-website/tsconfig.json +@uifabric/fabric-website: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/fabric-website/tsconfig.json" +@uifabric/fabric-website: info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. +ssr-tests: yarn run vX.X.X +ssr-tests: $ just-scripts ts +ssr-tests: Done in ?s. +@fluentui/examples: yarn run vX.X.X +@fluentui/examples: $ just-scripts ts +@fluentui/examples: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/examples/tsconfig.json +@fluentui/examples: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/examples/tsconfig.json" +@fluentui/examples: [XX:XX:XX XM] ■ Running /office-ui-fabric-react/node_modules/typescript/lib/tsc.js with /office-ui-fabric-react/packages/examples/tsconfig.json +@fluentui/examples: [XX:XX:XX XM] ■ Executing: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/examples/tsconfig.json" +@fluentui/examples: Done in ?s. Standard error: -info cli using local version of lerna -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@uifabric/tslint-rules: (Use `node --trace-warnings ...` to show where the warning was created) -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@uifabric/tslint-rules: (node:29) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@uifabric/tslint-rules: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect -@fluentui/ability-attributes: npm WARN lifecycle The node binary used for scripts is but npm is using /usr/local/bin/node itself. Use the `--scripts-prepend-node-path` option to include the path for the node binary npm was executed with. -@fluentui/ability-attributes: (node:87) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. -@fluentui/ability-attributes: (Use `node --trace-deprecation ...` to show where the warning was created) -@uifabric/build: warning package.json: "dependencies" has dependency "typescript" with range "3.7.2" that collides with a dependency in "devDependencies" of the same name with version "../typescript.tgz" -@uifabric/build: (node:146) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@uifabric/build: (Use `node --trace-warnings ...` to show where the warning was created) -@uifabric/build: (node:146) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@uifabric/build: (node:146) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@uifabric/example-data: (Use `node --trace-warnings ...` to show where the warning was created) -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@uifabric/example-data: (node:165) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@uifabric/example-data: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@fluentui/keyboard-key: (Use `node --trace-warnings ...` to show where the warning was created) -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@fluentui/keyboard-key: (node:204) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@fluentui/keyboard-key: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@uifabric/migration: (Use `node --trace-warnings ...` to show where the warning was created) -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@uifabric/migration: (node:243) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@uifabric/monaco-editor: (Use `node --trace-warnings ...` to show where the warning was created) -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@uifabric/monaco-editor: (node:274) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@uifabric/set-version: (Use `node --trace-warnings ...` to show where the warning was created) -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@uifabric/set-version: (node:313) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@uifabric/set-version: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@uifabric/webpack-utils: (Use `node --trace-warnings ...` to show where the warning was created) -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@uifabric/webpack-utils: (node:352) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@fluentui/docs-components: (node:383) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. -@fluentui/docs-components: (Use `node --trace-deprecation ...` to show where the warning was created) -@fluentui/react-component-event-listener: (node:414) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. -@fluentui/react-component-event-listener: (Use `node --trace-deprecation ...` to show where the warning was created) -@fluentui/react-component-nesting-registry: (node:445) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. -@fluentui/react-component-nesting-registry: (Use `node --trace-deprecation ...` to show where the warning was created) -@fluentui/react-component-ref: (node:476) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. -@fluentui/react-component-ref: (Use `node --trace-deprecation ...` to show where the warning was created) -@fluentui/react-context-selector: (node:507) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. -@fluentui/react-context-selector: (Use `node --trace-deprecation ...` to show where the warning was created) -@fluentui/react-proptypes: (node:538) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. -@fluentui/react-proptypes: (Use `node --trace-deprecation ...` to show where the warning was created) -@fluentui/state: (node:569) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. -@fluentui/state: (Use `node --trace-deprecation ...` to show where the warning was created) -@fluentui/styles: (node:600) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. -@fluentui/styles: (Use `node --trace-deprecation ...` to show where the warning was created) -@fluentui/accessibility: (node:631) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. -@fluentui/accessibility: (Use `node --trace-deprecation ...` to show where the warning was created) -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@fluentui/date-time-utilities: (Use `node --trace-warnings ...` to show where the warning was created) -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@fluentui/date-time-utilities: (node:662) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@fluentui/date-time-utilities: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@uifabric/merge-styles: (Use `node --trace-warnings ...` to show where the warning was created) -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@uifabric/merge-styles: (node:701) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@uifabric/merge-styles: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect -@fluentui/react-northstar-styles-renderer: (node:740) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. -@fluentui/react-northstar-styles-renderer: (Use `node --trace-deprecation ...` to show where the warning was created) -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (Use `node --trace-warnings ...` to show where the warning was created) -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: (node:771) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@uifabric/jest-serializer-merge-styles: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect -@fluentui/react-northstar-emotion-renderer: (node:810) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. -@fluentui/react-northstar-emotion-renderer: (Use `node --trace-deprecation ...` to show where the warning was created) -@fluentui/react-northstar-fela-renderer: (node:841) [DEP0097] DeprecationWarning: Using a domain property in MakeCallback is deprecated. Use the async_context variant of MakeCallback or the AsyncResource class instead. -@fluentui/react-northstar-fela-renderer: (Use `node --trace-deprecation ...` to show where the warning was created) -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@fluentui/react-stylesheets: (Use `node --trace-warnings ...` to show where the warning was created) -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@fluentui/react-stylesheets: (node:872) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@fluentui/react-stylesheets: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@uifabric/test-utilities: (Use `node --trace-warnings ...` to show where the warning was created) -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@uifabric/test-utilities: (node:911) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@uifabric/utilities: (Use `node --trace-warnings ...` to show where the warning was created) -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@uifabric/utilities: (node:950) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@uifabric/utilities: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@fluentui/react-compose: (Use `node --trace-warnings ...` to show where the warning was created) -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@fluentui/react-compose: (node:989) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@fluentui/react-compose: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@uifabric/react-hooks: (Use `node --trace-warnings ...` to show where the warning was created) -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@uifabric/react-hooks: (node:1028) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@uifabric/react-hooks: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'cat' of module exports inside circular dependency -@fluentui/react-icons: (Use `node --trace-warnings ...` to show where the warning was created) -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'cd' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'chmod' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'cp' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'dirs' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'pushd' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'popd' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'echo' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'tempdir' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'pwd' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'exec' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'ls' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'find' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'grep' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'head' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'ln' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'mkdir' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'rm' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'mv' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'sed' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'set' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'sort' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'tail' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'test' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'to' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'toEnd' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'touch' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'uniq' of module exports inside circular dependency -@fluentui/react-icons: (node:1067) Warning: Accessing non-existent property 'which' of module exports inside circular dependency -@fluentui/react-icons: [XX:XX:XX XM] ▲ One of these [node-sass, postcss, autoprefixer] is not installed, so this task has no effect +@fluentui/eslint-plugin: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/eslint-plugin: [XX:XX:XX XM] x Command not defined: ts +@fluentui/noop: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/noop: [XX:XX:XX XM] x Command not defined: ts +@fluentui/web-components: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/web-components: [XX:XX:XX XM] x Command not defined: ts +@fluentui/ability-attributes: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/ability-attributes: [XX:XX:XX XM] x Command not defined: ts +@uifabric/build: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@uifabric/build: [XX:XX:XX XM] x ------------------------------------ +@uifabric/build: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/scripts/tsconfig.json" +@uifabric/build: at ChildProcess.exithandler (child_process.js:303:12) +@uifabric/build: at ChildProcess.emit (events.js:315:20) +@uifabric/build: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@uifabric/build: at maybeClose (internal/child_process.js:1021:16) +@uifabric/build: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@uifabric/build: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@uifabric/build: [XX:XX:XX XM] x stdout: +@uifabric/build: [XX:XX:XX XM] x create-package/plop-templates-node/just.config.ts:1:9 - error TS2451: Cannot redeclare block-scoped variable 'preset'. +@uifabric/build: 1 const { preset, just } = require('@uifabric/build'); +@uifabric/build: ~~~~~~ +@uifabric/build: create-package/plop-templates-react/just.config.ts:1:9 +@uifabric/build: 1 const { preset } = require('@uifabric/build'); +@uifabric/build: ~~~~~~ +@uifabric/build: 'preset' was also declared here. +@uifabric/build: tasks/preset.ts:1:7 +@uifabric/build: 1 const preset = require('../just.config'); +@uifabric/build: ~~~~~~ +@uifabric/build: and here. +@uifabric/build: create-package/plop-templates-node/just.config.ts:2:9 - error TS2451: Cannot redeclare block-scoped variable 'task'. +@uifabric/build: 2 const { task } = just; +@uifabric/build: ~~~~ +@uifabric/build: just.config.ts:3:9 +@uifabric/build: 3 const { task, series, parallel, condition, option, argv, addResolvePath, resolveCwd } = require('just-scripts'); +@uifabric/build: ~~~~ +@uifabric/build: 'task' was also declared here. +@uifabric/build: create-package/plop-templates-react/just.config.ts:1:9 - error TS2451: Cannot redeclare block-scoped variable 'preset'. +@uifabric/build: 1 const { preset } = require('@uifabric/build'); +@uifabric/build: ~~~~~~ +@uifabric/build: create-package/plop-templates-node/just.config.ts:1:9 +@uifabric/build: 1 const { preset, just } = require('@uifabric/build'); +@uifabric/build: ~~~~~~ +@uifabric/build: 'preset' was also declared here. +@uifabric/build: create-package/plop-templates-react/src/version.ts:3:28 - error TS2307: Cannot find module '@uifabric/set-version' or its corresponding type declarations. +@uifabric/build: 3 import { setVersion } from '@uifabric/set-version'; +@uifabric/build: ~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/build: gulp/plugins/util/getComponentInfo.ts:145:9 - error TS2322: Type 'Tag[]' is not assignable to type '{ title: string; description: string; type: null; name: string; }[]'. +@uifabric/build: Type 'Tag' is not assignable to type '{ title: string; description: string; type: null; name: string; }'. +@uifabric/build: Types of property 'type' are incompatible. +@uifabric/build: Type 'Type' is not assignable to type 'null'. +@uifabric/build: Type 'AllLiteral' is not assignable to type 'null'. +@uifabric/build: 145 tags, +@uifabric/build: ~~~~ +@uifabric/build: gulp/plugins/util/docs-types.ts:49:3 +@uifabric/build: 49 tags: { +@uifabric/build: ~~~~ +@uifabric/build: The expected type comes from property 'tags' which is declared here on type 'ComponentProp' +@uifabric/build: gulp/plugins/util/tsLanguageService.ts:25:18 - error TS2569: Type 'IterableIterator' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators. +@uifabric/build: 25 return [...files.keys()]; +@uifabric/build: ~~~~~~~~~~~~ +@uifabric/build: gulp/tasks/browserAdapters.ts:58:7 - error TS2794: Expected 1 arguments, but got 0. Did you forget to include 'void' in your type argument to 'Promise'? +@uifabric/build: 58 resolve(); +@uifabric/build: ~~~~~~~~~ +@uifabric/build: ../node_modules/typescript/lib/lib.es2015.promise.d.ts:33:34 +@uifabric/build: 33 new (executor: (resolve: (value: T | PromiseLike) => void, reject: (reason?: any) => void) => void): Promise; +@uifabric/build: ~~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/build: An argument for 'value' was not provided. +@uifabric/build: index.js:1:1 - error TS9006: Declaration emit for this file requires using private name 'CssLoaderOptions' from module '"/office-ui-fabric-react/node_modules/just-scripts/lib/webpack/overlays/stylesOverlay"'. An explicit type annotation may unblock declaration emit. +@uifabric/build: 1 const just = require('just-scripts'); +@uifabric/build: ~~~~~ +@uifabric/build: index.js:1:1 - error TS9006: Declaration emit for this file requires using private name 'PrettierTaskOptions' from module '"/office-ui-fabric-react/node_modules/just-scripts/lib/tasks/prettierTask"'. An explicit type annotation may unblock declaration emit. +@uifabric/build: 1 const just = require('just-scripts'); +@uifabric/build: ~~~~~ +@uifabric/build: just.config.ts:3:9 - error TS2451: Cannot redeclare block-scoped variable 'task'. +@uifabric/build: 3 const { task, series, parallel, condition, option, argv, addResolvePath, resolveCwd } = require('just-scripts'); +@uifabric/build: ~~~~ +@uifabric/build: create-package/plop-templates-node/just.config.ts:2:9 +@uifabric/build: 2 const { task } = just; +@uifabric/build: ~~~~ +@uifabric/build: 'task' was also declared here. +@uifabric/build: monorepo/findRepoDeps.js:51:18 - error TS2569: Type 'Set' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators. +@uifabric/build: 51 repoDeps = [...result].map(dep => packageInfo[dep]); +@uifabric/build: ~~~~~~ +@uifabric/build: publish-beta.js:18:12 - error TS1212: Identifier expected. 'package' is a reserved word in strict mode. +@uifabric/build: 18 for (const package of packages) { +@uifabric/build: ~~~~~~~ +@uifabric/build: publish-beta.js:19:53 - error TS1212: Identifier expected. 'package' is a reserved word in strict mode. +@uifabric/build: 19 const packagePath = path.resolve(__dirname, '..', package.packagePath); +@uifabric/build: ~~~~~~~ +@uifabric/build: publish-beta.js:21:43 - error TS1212: Identifier expected. 'package' is a reserved word in strict mode. +@uifabric/build: 21 console.log(`Publishing ${chalk.magenta(package.packageName)} in ${packagePath}`); +@uifabric/build: ~~~~~~~ +@uifabric/build: tasks/preset.ts:1:7 - error TS2451: Cannot redeclare block-scoped variable 'preset'. +@uifabric/build: 1 const preset = require('../just.config'); +@uifabric/build: ~~~~~~ +@uifabric/build: create-package/plop-templates-node/just.config.ts:1:9 +@uifabric/build: 1 const { preset, just } = require('@uifabric/build'); +@uifabric/build: ~~~~~~ +@uifabric/build: 'preset' was also declared here. +@uifabric/build: update-package-versions.js:11:7 - error TS6133: 'path' is declared but its value is never read. +@uifabric/build: 11 const path = require('path'); +@uifabric/build: ~~~~ +@uifabric/build: update-package-versions.js:47:12 - error TS1250: Function declarations are not allowed inside blocks in strict mode when targeting 'ES3' or 'ES5'. +@uifabric/build: 47 function updateDependencies(deps) { +@uifabric/build: ~~~~~~~~~~~~~~~~~~ +@uifabric/build: Found 17 errors. +@uifabric/build: [XX:XX:XX XM] x ------------------------------------ +@uifabric/build: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@uifabric/build: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@uifabric/build: error Command failed with exit code 1. +@fluentui/ie11-polyfills: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/ie11-polyfills: [XX:XX:XX XM] x Command not defined: ts +@uifabric/webpack-utils: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@uifabric/webpack-utils: [XX:XX:XX XM] x ------------------------------------ +@uifabric/webpack-utils: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/webpack-utils/tsconfig.json" +@uifabric/webpack-utils: at ChildProcess.exithandler (child_process.js:303:12) +@uifabric/webpack-utils: at ChildProcess.emit (events.js:315:20) +@uifabric/webpack-utils: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@uifabric/webpack-utils: at maybeClose (internal/child_process.js:1021:16) +@uifabric/webpack-utils: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@uifabric/webpack-utils: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@uifabric/webpack-utils: [XX:XX:XX XM] x stdout: +@uifabric/webpack-utils: [XX:XX:XX XM] x src/fabricAsyncLoaderInclude.ts:7:1 - error TS1203: Export assignment cannot be used when targeting ECMAScript modules. Consider using 'export default' or another module format instead. +@uifabric/webpack-utils: 7 export = (input: string) => +@uifabric/webpack-utils: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/webpack-utils: 8 input.match(/office-ui-fabric-react[\\/]lib[\\/]components[\\/]ContextualMenu[\\/]ContextualMenu.js/) || +@uifabric/webpack-utils: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/webpack-utils: 9 input.match(/office-ui-fabric-react[\\/]lib[\\/]components[\\/]Callout[\\/]Callout.js/); +@uifabric/webpack-utils: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/webpack-utils: Found 1 error. +@uifabric/webpack-utils: [XX:XX:XX XM] x ------------------------------------ +@uifabric/webpack-utils: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@uifabric/webpack-utils: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@uifabric/webpack-utils: error Command failed with exit code 1. +@fluentui/docs-components: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/docs-components: [XX:XX:XX XM] x Command not defined: ts +@fluentui/react-component-event-listener: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/react-component-event-listener: [XX:XX:XX XM] x Command not defined: ts +@fluentui/react-component-nesting-registry: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/react-component-nesting-registry: [XX:XX:XX XM] x Command not defined: ts +@fluentui/react-component-ref: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/react-component-ref: [XX:XX:XX XM] x Command not defined: ts +@fluentui/react-context-selector: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/react-context-selector: [XX:XX:XX XM] x Command not defined: ts +@fluentui/react-proptypes: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/react-proptypes: [XX:XX:XX XM] x Command not defined: ts +@fluentui/state: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/state: [XX:XX:XX XM] x Command not defined: ts +@fluentui/styles: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/styles: [XX:XX:XX XM] x Command not defined: ts +@fluentui/accessibility: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/accessibility: [XX:XX:XX XM] x Command not defined: ts +@uifabric/merge-styles: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@uifabric/merge-styles: [XX:XX:XX XM] x ------------------------------------ +@uifabric/merge-styles: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/merge-styles/tsconfig.json" +@uifabric/merge-styles: at ChildProcess.exithandler (child_process.js:303:12) +@uifabric/merge-styles: at ChildProcess.emit (events.js:315:20) +@uifabric/merge-styles: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@uifabric/merge-styles: at maybeClose (internal/child_process.js:1021:16) +@uifabric/merge-styles: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@uifabric/merge-styles: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@uifabric/merge-styles: [XX:XX:XX XM] x stdout: +@uifabric/merge-styles: [XX:XX:XX XM] x src/mergeStyleSets.test.ts:168:15 - error TS2310: Type 'ISubComponentStyles' recursively references itself as a base type. +@uifabric/merge-styles: 168 interface ISubComponentStyles extends IStyleSet { +@uifabric/merge-styles: ~~~~~~~~~~~~~~~~~~~ +@uifabric/merge-styles: src/mergeStyleSets.test.ts:176:15 - error TS2310: Type 'IStyles' recursively references itself as a base type. +@uifabric/merge-styles: 176 interface IStyles extends IStyleSet { +@uifabric/merge-styles: ~~~~~~~ +@uifabric/merge-styles: Found 2 errors. +@uifabric/merge-styles: [XX:XX:XX XM] x ------------------------------------ +@uifabric/merge-styles: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@uifabric/merge-styles: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@uifabric/merge-styles: error Command failed with exit code 1. +@fluentui/react-northstar-styles-renderer: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/react-northstar-styles-renderer: [XX:XX:XX XM] x Command not defined: ts +@fluentui/react-northstar-emotion-renderer: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/react-northstar-emotion-renderer: [XX:XX:XX XM] x Command not defined: ts +@fluentui/react-northstar-fela-renderer: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/react-northstar-fela-renderer: [XX:XX:XX XM] x Command not defined: ts +@uifabric/utilities: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@uifabric/utilities: [XX:XX:XX XM] x ------------------------------------ +@uifabric/utilities: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/utilities/tsconfig.json" +@uifabric/utilities: at ChildProcess.exithandler (child_process.js:303:12) +@uifabric/utilities: at ChildProcess.emit (events.js:315:20) +@uifabric/utilities: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@uifabric/utilities: at maybeClose (internal/child_process.js:1021:16) +@uifabric/utilities: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@uifabric/utilities: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@uifabric/utilities: [XX:XX:XX XM] x stdout: +@uifabric/utilities: [XX:XX:XX XM] x src/AutoScroll.ts:143:14 - error TS2790: The operand of a 'delete' operator must be optional. +@uifabric/utilities: 143 delete this._timeoutId; +@uifabric/utilities: ~~~~~~~~~~~~~~~ +@uifabric/utilities: src/dom/getRect.ts:19:16 - error TS2774: This condition will always return true since the function is always defined. Did you mean to call it instead? +@uifabric/utilities: 19 } else if ((element as HTMLElement).getBoundingClientRect) { +@uifabric/utilities: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/utilities: src/object.ts:9:11 - error TS2339: Property 'hasOwnProperty' does not exist on type 'TA'. +@uifabric/utilities: 9 if (a.hasOwnProperty(propName)) { +@uifabric/utilities: ~~~~~~~~~~~~~~ +@uifabric/utilities: src/object.ts:10:14 - error TS2339: Property 'hasOwnProperty' does not exist on type 'TB'. +@uifabric/utilities: 10 if (!b.hasOwnProperty(propName) || b[propName] !== a[propName]) { +@uifabric/utilities: ~~~~~~~~~~~~~~ +@uifabric/utilities: src/object.ts:10:42 - error TS2536: Type 'Extract' cannot be used to index type 'TB'. +@uifabric/utilities: 10 if (!b.hasOwnProperty(propName) || b[propName] !== a[propName]) { +@uifabric/utilities: ~~~~~~~~~~~ +@uifabric/utilities: src/object.ts:16:11 - error TS2339: Property 'hasOwnProperty' does not exist on type 'TB'. +@uifabric/utilities: 16 if (b.hasOwnProperty(propName)) { +@uifabric/utilities: ~~~~~~~~~~~~~~ +@uifabric/utilities: src/object.ts:17:14 - error TS2339: Property 'hasOwnProperty' does not exist on type 'TA'. +@uifabric/utilities: 17 if (!a.hasOwnProperty(propName)) { +@uifabric/utilities: ~~~~~~~~~~~~~~ +@uifabric/utilities: Found 7 errors. +@uifabric/utilities: [XX:XX:XX XM] x ------------------------------------ +@uifabric/utilities: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@uifabric/utilities: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@uifabric/utilities: error Command failed with exit code 1. @fluentui/react-icons: [XX:XX:XX XM] x Error detected while running 'ts:esm' @fluentui/react-icons: [XX:XX:XX XM] x ------------------------------------ @fluentui/react-icons: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-icons/tsconfig.json" -@fluentui/react-icons: at ChildProcess.exithandler (child_process.js:308:12) -@fluentui/react-icons: at ChildProcess.emit (events.js:314:20) -@fluentui/react-icons: at ChildProcess.EventEmitter.emit (domain.js:548:15) -@fluentui/react-icons: at maybeClose (internal/child_process.js:1051:16) -@fluentui/react-icons: at Process.ChildProcess._handle.onexit (internal/child_process.js:287:5) -@fluentui/react-icons: at Process.topLevelDomainCallback (domain.js:138:15) -@fluentui/react-icons: at Process.callbackTrampoline (internal/async_hooks.js:121:14) +@fluentui/react-icons: at ChildProcess.exithandler (child_process.js:303:12) +@fluentui/react-icons: at ChildProcess.emit (events.js:315:20) +@fluentui/react-icons: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-icons: at maybeClose (internal/child_process.js:1021:16) +@fluentui/react-icons: at Socket. (internal/child_process.js:443:11) +@fluentui/react-icons: at Socket.emit (events.js:315:20) +@fluentui/react-icons: at Socket.EventEmitter.emit (domain.js:506:15) +@fluentui/react-icons: at Pipe. (net.js:674:12) +@fluentui/react-icons: at Pipe.callbackTrampoline (internal/async_hooks.js:120:14) @fluentui/react-icons: [XX:XX:XX XM] x stdout: -@fluentui/react-icons: [XX:XX:XX XM] x src/utils/createSvgIcon.ts:3:26 - error TS2307: Cannot find module './SvgIcon.scss'. +@fluentui/react-icons: [XX:XX:XX XM] x src/utils/createSvgIcon.ts:3:26 - error TS2307: Cannot find module './SvgIcon.scss' or its corresponding type declarations. @fluentui/react-icons: 3 import * as classes from './SvgIcon.scss'; @fluentui/react-icons: ~~~~~~~~~~~~~~~~ @fluentui/react-icons: Found 1 error. @@ -784,4 +831,1817 @@ info cli using local version of lerna @fluentui/react-icons: [XX:XX:XX XM] x Error previously detected. See above for error messages. @fluentui/react-icons: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] @fluentui/react-icons: error Command failed with exit code 1. -lerna ERR! yarn run build exited 1 in '@fluentui/react-icons' +@fluentui/react-bindings: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/react-bindings: [XX:XX:XX XM] x Command not defined: ts +@fluentui/react-icons-northstar: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/react-icons-northstar: [XX:XX:XX XM] x Command not defined: ts +@fluentui/react-telemetry: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/react-telemetry: [XX:XX:XX XM] x Command not defined: ts +@uifabric/foundation: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@uifabric/foundation: [XX:XX:XX XM] x ------------------------------------ +@uifabric/foundation: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/foundation/tsconfig.json" +@uifabric/foundation: at ChildProcess.exithandler (child_process.js:303:12) +@uifabric/foundation: at ChildProcess.emit (events.js:315:20) +@uifabric/foundation: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@uifabric/foundation: at maybeClose (internal/child_process.js:1021:16) +@uifabric/foundation: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@uifabric/foundation: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@uifabric/foundation: [XX:XX:XX XM] x stdout: +@uifabric/foundation: [XX:XX:XX XM] x src/createComponent.tsx:81:23 - error TS2352: Conversion of type 'TComponentProps & { styles: IConcatenatedStyleSet; tokens: TTokens; _defaultStyles: IConcatenatedStyleSet; theme: ITheme; className?: string | undefined; }' to type 'TViewProps & IDefaultSlotProps' may be a mistake because neither type sufficiently overlaps with the other. If this was intentional, convert the expression to 'unknown' first. +@uifabric/foundation: Type 'TComponentProps & { styles: IConcatenatedStyleSet; tokens: TTokens; _defaultStyles: IConcatenatedStyleSet; theme: ITheme; className?: string | undefined; }' is not comparable to type 'TViewProps'. +@uifabric/foundation: 'TComponentProps & { styles: IConcatenatedStyleSet; tokens: TTokens; _defaultStyles: IConcatenatedStyleSet; theme: ITheme; className?: string | undefined; }' is assignable to the constraint of type 'TViewProps', but 'TViewProps' could be instantiated with a different subtype of constraint 'object'. +@uifabric/foundation: 81 const viewProps = { +@uifabric/foundation: ~ +@uifabric/foundation: 82 ...componentProps, +@uifabric/foundation: ~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/foundation: ... +@uifabric/foundation: 86 theme, +@uifabric/foundation: ~~~~~~~~~~~~ +@uifabric/foundation: 87 } as TViewProps & IDefaultSlotProps; +@uifabric/foundation: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/foundation: Found 1 error. +@uifabric/foundation: [XX:XX:XX XM] x ------------------------------------ +@uifabric/foundation: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@uifabric/foundation: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@uifabric/foundation: error Command failed with exit code 1. +@fluentui/react-northstar: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/react-northstar: [XX:XX:XX XM] x Command not defined: ts +office-ui-fabric-react: [XX:XX:XX XM] x Error detected while running 'ts:esm' +office-ui-fabric-react: [XX:XX:XX XM] x ------------------------------------ +office-ui-fabric-react: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/office-ui-fabric-react/tsconfig.json" +office-ui-fabric-react: at ChildProcess.exithandler (child_process.js:303:12) +office-ui-fabric-react: at ChildProcess.emit (events.js:315:20) +office-ui-fabric-react: at ChildProcess.EventEmitter.emit (domain.js:506:15) +office-ui-fabric-react: at maybeClose (internal/child_process.js:1021:16) +office-ui-fabric-react: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +office-ui-fabric-react: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +office-ui-fabric-react: [XX:XX:XX XM] x stdout: +office-ui-fabric-react: [XX:XX:XX XM] x src/components/ChoiceGroup/ChoiceGroup.base.tsx:147:19 - error TS2783: 'key' is specified more than once, so this usage will be overwritten. +office-ui-fabric-react: 147 key={option.key} +office-ui-fabric-react: ~~~~~~~~~~~~~~~~ +office-ui-fabric-react: src/components/ChoiceGroup/ChoiceGroup.base.tsx:151:19 +office-ui-fabric-react: 151 {...innerOptionProps} +office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: This spread always overwrites this property. +office-ui-fabric-react: src/components/ChoiceGroup/ChoiceGroupOption/ChoiceGroupOption.base.tsx:82:38 - error TS2554: Expected 1 arguments, but got 2. +office-ui-fabric-react: 82 {onRenderField(this.props, this._onRenderField)} +office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: src/components/ComboBox/ComboBox.tsx:421:13 - error TS2554: Expected 1 arguments, but got 2. +office-ui-fabric-react: 421 this._onRenderContainer, +office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: src/components/DetailsList/DetailsColumn.base.tsx:194:14 - error TS2790: The operand of a 'delete' operator must be optional. +office-ui-fabric-react: 194 delete this._dragDropSubscription; +office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: src/components/DetailsList/DetailsColumn.base.tsx:208:14 - error TS2790: The operand of a 'delete' operator must be optional. +office-ui-fabric-react: 208 delete this._dragDropSubscription; +office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: src/components/DetailsList/DetailsHeader.base.tsx:132:14 - error TS2790: The operand of a 'delete' operator must be optional. +office-ui-fabric-react: 132 delete this._subscriptionObject; +office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: src/components/DetailsList/DetailsHeader.base.tsx:154:14 - error TS2790: The operand of a 'delete' operator must be optional. +office-ui-fabric-react: 154 delete this._subscriptionObject; +office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: src/components/DetailsList/DetailsRow.base.tsx:109:16 - error TS2790: The operand of a 'delete' operator must be optional. +office-ui-fabric-react: 109 delete this._dragDropSubscription; +office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: src/components/DetailsList/DetailsRow.base.tsx:147:14 - error TS2790: The operand of a 'delete' operator must be optional. +office-ui-fabric-react: 147 delete this._dragDropSubscription; +office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: src/components/FloatingPicker/PeoplePicker/PeoplePickerItems/SuggestionItemDefault.tsx:12:72 - error TS2339: Property 'peoplePickerPersonaContent' does not exist on type 'typeof import("*.scss")'. +office-ui-fabric-react: 12
+office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: src/components/FloatingPicker/PeoplePicker/PeoplePickerItems/SuggestionItemDefault.tsx:16:64 - error TS2339: Property 'peoplePickerPersona' does not exist on type 'typeof import("*.scss")'. +office-ui-fabric-react: 16 className={css('ms-PeoplePicker-Persona', stylesImport.peoplePickerPersona)} +office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: src/components/FocusTrapZone/FocusTrapZone.tsx:106:12 - error TS2790: The operand of a 'delete' operator must be optional. +office-ui-fabric-react: 106 delete this._previouslyFocusedElementOutsideTrapZone; +office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: src/components/GroupedList/GroupedListSection.tsx:174:16 - error TS2790: The operand of a 'delete' operator must be optional. +office-ui-fabric-react: 174 delete this._dragDropSubscription; +office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: src/components/List/List.tsx:340:12 - error TS2790: The operand of a 'delete' operator must be optional. +office-ui-fabric-react: 340 delete this._scrollElement; +office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: src/components/MarqueeSelection/MarqueeSelection.base.tsx:88:12 - error TS2790: The operand of a 'delete' operator must be optional. +office-ui-fabric-react: 88 delete this._scrollableParent; +office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: src/components/MarqueeSelection/MarqueeSelection.base.tsx:89:12 - error TS2790: The operand of a 'delete' operator must be optional. +office-ui-fabric-react: 89 delete this._scrollableSurface; +office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: src/components/Persona/Persona.deprecated.test.tsx:113:13 - error TS2322: Type 'ReactWrapper>' is not assignable to type 'ReactWrapper, any, Component<{}, {}, any>>'. +office-ui-fabric-react: Type 'HTMLAttributes' is not assignable to type 'ImgHTMLAttributes'. +office-ui-fabric-react: Types of property 'crossOrigin' are incompatible. +office-ui-fabric-react: Type 'string | undefined' is not assignable to type '"" | "anonymous" | "use-credentials" | undefined'. +office-ui-fabric-react: Type 'string' is not assignable to type '"" | "anonymous" | "use-credentials" | undefined'. +office-ui-fabric-react: 113 const image: ReactWrapper, any> = wrapper.find('ImageBase'); +office-ui-fabric-react: ~~~~~ +office-ui-fabric-react: src/components/Persona/Persona.deprecated.test.tsx:120:13 - error TS2322: Type 'ReactWrapper>' is not assignable to type 'ReactWrapper, any, Component<{}, {}, any>>'. +office-ui-fabric-react: 120 const image: ReactWrapper, any> = wrapper.find('ImageBase'); +office-ui-fabric-react: ~~~~~ +office-ui-fabric-react: src/components/Persona/Persona.test.tsx:190:13 - error TS2322: Type 'ReactWrapper>' is not assignable to type 'ReactWrapper, any, Component<{}, {}, any>>'. +office-ui-fabric-react: 190 const image: ReactWrapper, any> = wrapper.find('ImageBase'); +office-ui-fabric-react: ~~~~~ +office-ui-fabric-react: src/components/Persona/Persona.test.tsx:197:13 - error TS2322: Type 'ReactWrapper>' is not assignable to type 'ReactWrapper, any, Component<{}, {}, any>>'. +office-ui-fabric-react: 197 const image: ReactWrapper, any> = wrapper.find('ImageBase'); +office-ui-fabric-react: ~~~~~ +office-ui-fabric-react: src/components/Popup/Popup.tsx:79:12 - error TS2790: The operand of a 'delete' operator must be optional. +office-ui-fabric-react: 79 delete this._originalFocusedElement; +office-ui-fabric-react: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +office-ui-fabric-react: Found 21 errors. +office-ui-fabric-react: [XX:XX:XX XM] x ------------------------------------ +office-ui-fabric-react: [XX:XX:XX XM] x Error previously detected. See above for error messages. +office-ui-fabric-react: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +office-ui-fabric-react: error Command failed with exit code 1. +@fluentui/circulars-test: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/circulars-test: [XX:XX:XX XM] x Command not defined: ts +@fluentui/code-sandbox: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/code-sandbox: [XX:XX:XX XM] x Command not defined: ts +@fluentui/local-sandbox: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/local-sandbox: [XX:XX:XX XM] x Command not defined: ts +@fluentui/projects-test: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/projects-test: [XX:XX:XX XM] x Command not defined: ts +@uifabric/tsx-editor: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@uifabric/tsx-editor: [XX:XX:XX XM] x ------------------------------------ +@uifabric/tsx-editor: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/tsx-editor/tsconfig.json" +@uifabric/tsx-editor: at ChildProcess.exithandler (child_process.js:303:12) +@uifabric/tsx-editor: at ChildProcess.emit (events.js:315:20) +@uifabric/tsx-editor: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@uifabric/tsx-editor: at maybeClose (internal/child_process.js:1021:16) +@uifabric/tsx-editor: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@uifabric/tsx-editor: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@uifabric/tsx-editor: [XX:XX:XX XM] x stdout: +@uifabric/tsx-editor: [XX:XX:XX XM] x ../monaco-editor/monaco-typescript.d.ts:8:25 - error TS2307: Cannot find module '@uifabric/monaco-editor' or its corresponding type declarations. +@uifabric/tsx-editor: 8 import * as monaco from '@uifabric/monaco-editor'; +@uifabric/tsx-editor: ~~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/tsx-editor: src/components/Editor.tsx:1:25 - error TS2307: Cannot find module '@uifabric/monaco-editor' or its corresponding type declarations. +@uifabric/tsx-editor: 1 import * as monaco from '@uifabric/monaco-editor'; +@uifabric/tsx-editor: ~~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/tsx-editor: src/components/TsxEditor.tsx:3:25 - error TS2307: Cannot find module '@uifabric/monaco-editor' or its corresponding type declarations. +@uifabric/tsx-editor: 3 import * as monaco from '@uifabric/monaco-editor'; +@uifabric/tsx-editor: ~~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/tsx-editor: src/interfaces/monaco.ts:5:25 - error TS2307: Cannot find module '@uifabric/monaco-editor/esm/vs/editor/editor.api' or its corresponding type declarations. +@uifabric/tsx-editor: 5 import * as monaco from '@uifabric/monaco-editor/esm/vs/editor/editor.api'; +@uifabric/tsx-editor: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/tsx-editor: src/transpiler/transpile.ts:2:25 - error TS2307: Cannot find module '@uifabric/monaco-editor' or its corresponding type declarations. +@uifabric/tsx-editor: 2 import * as monaco from '@uifabric/monaco-editor'; +@uifabric/tsx-editor: ~~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/tsx-editor: src/transpiler/transpile.ts:26:11 - error TS7006: Parameter 'worker' implicitly has an 'any' type. +@uifabric/tsx-editor: 26 .then(worker => { +@uifabric/tsx-editor: ~~~~~~ +@uifabric/tsx-editor: src/transpiler/transpile.ts:31:62 - error TS7006: Parameter 'syntacticDiagnostics' implicitly has an 'any' type. +@uifabric/tsx-editor: 31 return worker.getSyntacticDiagnostics(filename).then(syntacticDiagnostics => { +@uifabric/tsx-editor: ~~~~~~~~~~~~~~~~~~~~ +@uifabric/tsx-editor: src/transpiler/transpile.ts:32:62 - error TS7006: Parameter 'd' implicitly has an 'any' type. +@uifabric/tsx-editor: 32 syntacticDiagnostics = syntacticDiagnostics.filter(d => d.category === 1 /*error*/); +@uifabric/tsx-editor: ~ +@uifabric/tsx-editor: src/transpiler/transpile.ts:50:12 - error TS7006: Parameter 'ex' implicitly has an 'any' type. +@uifabric/tsx-editor: 50 .catch(ex => { +@uifabric/tsx-editor: ~~ +@uifabric/tsx-editor: src/utilities/getQueryParam.test.ts:7:12 - error TS2790: The operand of a 'delete' operator must be optional. +@uifabric/tsx-editor: 7 delete window.location; +@uifabric/tsx-editor: ~~~~~~~~~~~~~~~ +@uifabric/tsx-editor: Found 10 errors. +@uifabric/tsx-editor: [XX:XX:XX XM] x ------------------------------------ +@uifabric/tsx-editor: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@uifabric/tsx-editor: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@uifabric/tsx-editor: error Command failed with exit code 1. +@fluentui/e2e: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/e2e: [XX:XX:XX XM] x Command not defined: ts +codesandbox-react-northstar-template: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +codesandbox-react-northstar-template: [XX:XX:XX XM] x ------------------------------------ +codesandbox-react-northstar-template: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/codesandbox-react-northstar-template/tsconfig.json" +codesandbox-react-northstar-template: at ChildProcess.exithandler (child_process.js:303:12) +codesandbox-react-northstar-template: at ChildProcess.emit (events.js:315:20) +codesandbox-react-northstar-template: at ChildProcess.EventEmitter.emit (domain.js:506:15) +codesandbox-react-northstar-template: at maybeClose (internal/child_process.js:1021:16) +codesandbox-react-northstar-template: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +codesandbox-react-northstar-template: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +codesandbox-react-northstar-template: [XX:XX:XX XM] x stdout: +codesandbox-react-northstar-template: [XX:XX:XX XM] x src/index.tsx:15:8 - error TS2307: Cannot find module '@fluentui/react-northstar' or its corresponding type declarations. +codesandbox-react-northstar-template: 15 } from '@fluentui/react-northstar'; +codesandbox-react-northstar-template: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +codesandbox-react-northstar-template: src/index.tsx:16:28 - error TS2307: Cannot find module '@fluentui/code-sandbox' or its corresponding type declarations. +codesandbox-react-northstar-template: 16 import { SandboxApp } from '@fluentui/code-sandbox'; +codesandbox-react-northstar-template: ~~~~~~~~~~~~~~~~~~~~~~~~ +codesandbox-react-northstar-template: Found 2 errors. +codesandbox-react-northstar-template: [XX:XX:XX XM] x ------------------------------------ +codesandbox-react-northstar-template: [XX:XX:XX XM] x Error previously detected. See above for error messages. +codesandbox-react-northstar-template: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +codesandbox-react-northstar-template: error Command failed with exit code 1. +@fluentui/react-builder: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/react-builder: [XX:XX:XX XM] x Command not defined: ts +@fluentui/docs: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/docs: [XX:XX:XX XM] x Command not defined: ts +@uifabric/example-app-base: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@uifabric/example-app-base: [XX:XX:XX XM] x ------------------------------------ +@uifabric/example-app-base: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/example-app-base/tsconfig.json" +@uifabric/example-app-base: at ChildProcess.exithandler (child_process.js:303:12) +@uifabric/example-app-base: at ChildProcess.emit (events.js:315:20) +@uifabric/example-app-base: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@uifabric/example-app-base: at maybeClose (internal/child_process.js:1021:16) +@uifabric/example-app-base: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@uifabric/example-app-base: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@uifabric/example-app-base: [XX:XX:XX XM] x stdout: +@uifabric/example-app-base: [XX:XX:XX XM] x src/components/Page/Page.tsx:21:25 - error TS2307: Cannot find module './Page.module.scss' or its corresponding type declarations. +@uifabric/example-app-base: 21 import * as styles from './Page.module.scss'; +@uifabric/example-app-base: ~~~~~~~~~~~~~~~~~~~~ +@uifabric/example-app-base: src/components/Page/sections/BestPracticesSection.tsx:7:25 - error TS2307: Cannot find module '../Page.module.scss' or its corresponding type declarations. +@uifabric/example-app-base: 7 import * as styles from '../Page.module.scss'; +@uifabric/example-app-base: ~~~~~~~~~~~~~~~~~~~~~ +@uifabric/example-app-base: src/components/Page/sections/ExamplesSection.tsx:4:25 - error TS2307: Cannot find module '../Page.module.scss' or its corresponding type declarations. +@uifabric/example-app-base: 4 import * as styles from '../Page.module.scss'; +@uifabric/example-app-base: ~~~~~~~~~~~~~~~~~~~~~ +@uifabric/example-app-base: src/components/Page/sections/FeedbackSection.tsx:5:25 - error TS2307: Cannot find module '../Page.module.scss' or its corresponding type declarations. +@uifabric/example-app-base: 5 import * as styles from '../Page.module.scss'; +@uifabric/example-app-base: ~~~~~~~~~~~~~~~~~~~~~ +@uifabric/example-app-base: src/components/Page/sections/ImplementationSection.tsx:5:25 - error TS2307: Cannot find module '../Page.module.scss' or its corresponding type declarations. +@uifabric/example-app-base: 5 import * as styles from '../Page.module.scss'; +@uifabric/example-app-base: ~~~~~~~~~~~~~~~~~~~~~ +@uifabric/example-app-base: src/components/Page/sections/MarkdownSection.tsx:7:25 - error TS2307: Cannot find module '../Page.module.scss' or its corresponding type declarations. +@uifabric/example-app-base: 7 import * as styles from '../Page.module.scss'; +@uifabric/example-app-base: ~~~~~~~~~~~~~~~~~~~~~ +@uifabric/example-app-base: src/components/Page/sections/OtherPageSection.tsx:4:25 - error TS2307: Cannot find module '../Page.module.scss' or its corresponding type declarations. +@uifabric/example-app-base: 4 import * as styles from '../Page.module.scss'; +@uifabric/example-app-base: ~~~~~~~~~~~~~~~~~~~~~ +@uifabric/example-app-base: src/components/Page/sections/OverviewSection.tsx:4:25 - error TS2307: Cannot find module '../Page.module.scss' or its corresponding type declarations. +@uifabric/example-app-base: 4 import * as styles from '../Page.module.scss'; +@uifabric/example-app-base: ~~~~~~~~~~~~~~~~~~~~~ +@uifabric/example-app-base: src/components/PlatformPicker/PlatformPicker.tsx:12:25 - error TS2307: Cannot find module './PlatformPicker.module.scss' or its corresponding type declarations. +@uifabric/example-app-base: 12 import * as styles from './PlatformPicker.module.scss'; +@uifabric/example-app-base: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/example-app-base: src/components/Table/Table.tsx:4:25 - error TS2307: Cannot find module './Table.module.scss' or its corresponding type declarations. +@uifabric/example-app-base: 4 import * as styles from './Table.module.scss'; +@uifabric/example-app-base: ~~~~~~~~~~~~~~~~~~~~~ +@uifabric/example-app-base: src/components/TopNav/TopNav.tsx:7:25 - error TS2307: Cannot find module './TopNav.module.scss' or its corresponding type declarations. +@uifabric/example-app-base: 7 import * as styles from './TopNav.module.scss'; +@uifabric/example-app-base: ~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/example-app-base: src/components/Video/Video.tsx:4:25 - error TS2307: Cannot find module './Video.module.scss' or its corresponding type declarations. +@uifabric/example-app-base: 4 import * as styles from './Video.module.scss'; +@uifabric/example-app-base: ~~~~~~~~~~~~~~~~~~~~~ +@uifabric/example-app-base: src/utilities/createDemoApp.tsx:52:71 - error TS2783: 'appDefinition' is specified more than once, so this usage will be overwritten. +@uifabric/example-app-base: 52 const App: React.FunctionComponent = props => ; +@uifabric/example-app-base: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/example-app-base: src/utilities/createDemoApp.tsx:52:101 +@uifabric/example-app-base: 52 const App: React.FunctionComponent = props => ; +@uifabric/example-app-base: ~~~~~~~~~~ +@uifabric/example-app-base: This spread always overwrites this property. +@uifabric/example-app-base: Found 13 errors. +@uifabric/example-app-base: [XX:XX:XX XM] x ------------------------------------ +@uifabric/example-app-base: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@uifabric/example-app-base: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@uifabric/example-app-base: error Command failed with exit code 1. +@fluentui/perf: [XX:XX:XX XM] x Cannot find config file "null". Please create a file called "just.config.js" in the root of the project next to "package.json". +@fluentui/perf: [XX:XX:XX XM] x Command not defined: ts +@uifabric/date-time: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@uifabric/date-time: [XX:XX:XX XM] x ------------------------------------ +@uifabric/date-time: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/date-time/tsconfig.json" +@uifabric/date-time: at ChildProcess.exithandler (child_process.js:303:12) +@uifabric/date-time: at ChildProcess.emit (events.js:315:20) +@uifabric/date-time: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@uifabric/date-time: at maybeClose (internal/child_process.js:1021:16) +@uifabric/date-time: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@uifabric/date-time: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@uifabric/date-time: [XX:XX:XX XM] x stdout: +@uifabric/date-time: [XX:XX:XX XM] x src/components/Calendar/examples/Calendar.Inline.ContiguousWorkWeekDays.Example.tsx:30:30 - error TS2339: Property 'wrapper' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 30
+@uifabric/date-time: ~~~~~~~ +@uifabric/date-time: src/components/Calendar/examples/Calendar.Inline.CustomDayCellRef.Example.tsx:28:30 - error TS2339: Property 'wrapper' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 28
+@uifabric/date-time: ~~~~~~~ +@uifabric/date-time: src/components/Calendar/examples/Calendar.Inline.DateBoundaries.Example.tsx:27:30 - error TS2339: Property 'wrapper' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 27
+@uifabric/date-time: ~~~~~~~ +@uifabric/date-time: src/components/Calendar/examples/Calendar.Inline.MonthOnly.Example.tsx:30:30 - error TS2339: Property 'wrapper' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 30
+@uifabric/date-time: ~~~~~~~ +@uifabric/date-time: src/components/Calendar/examples/Calendar.Inline.MonthSelection.Example.tsx:34:30 - error TS2339: Property 'wrapper' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 34
+@uifabric/date-time: ~~~~~~~ +@uifabric/date-time: src/components/Calendar/examples/Calendar.Inline.MonthSelection.Example.tsx:54:44 - error TS2339: Property 'button' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 54 +@uifabric/date-time: ~~~~~~ +@uifabric/date-time: src/components/Calendar/examples/Calendar.Inline.MonthSelection.Example.tsx:55:44 - error TS2339: Property 'button' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 55 +@uifabric/date-time: ~~~~~~ +@uifabric/date-time: src/components/Calendar/examples/Calendar.Inline.MultidayDayView.Example.tsx:35:30 - error TS2339: Property 'wrapper' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 35
+@uifabric/date-time: ~~~~~~~ +@uifabric/date-time: src/components/Calendar/examples/Calendar.Inline.MultidayDayView.Example.tsx:59:31 - error TS2339: Property 'dropdown' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 59 className={styles.dropdown} +@uifabric/date-time: ~~~~~~~~ +@uifabric/date-time: src/components/Calendar/examples/Calendar.Inline.NonContiguousWorkWeekDays.Example.tsx:30:30 - error TS2339: Property 'wrapper' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 30
+@uifabric/date-time: ~~~~~~~ +@uifabric/date-time: src/components/Calendar/examples/Calendar.Inline.OverlayedMonthPicker.Example.tsx:21:30 - error TS2339: Property 'wrapper' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 21
+@uifabric/date-time: ~~~~~~~ +@uifabric/date-time: src/components/Calendar/examples/Calendar.Inline.SixWeeks.tsx:21:30 - error TS2339: Property 'wrapper' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 21
+@uifabric/date-time: ~~~~~~~ +@uifabric/date-time: src/components/Calendar/examples/Calendar.Inline.WeekNumbers.Example.tsx:21:30 - error TS2339: Property 'wrapper' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 21
+@uifabric/date-time: ~~~~~~~ +@uifabric/date-time: src/components/Calendar/examples/Calendar.Inline.WeekSelection.Example.tsx:34:30 - error TS2339: Property 'wrapper' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 34
+@uifabric/date-time: ~~~~~~~ +@uifabric/date-time: src/components/Calendar/examples/Calendar.Inline.WeekSelection.Example.tsx:54:44 - error TS2339: Property 'button' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 54 +@uifabric/date-time: ~~~~~~ +@uifabric/date-time: src/components/Calendar/examples/Calendar.Inline.WeekSelection.Example.tsx:55:44 - error TS2339: Property 'button' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 55 +@uifabric/date-time: ~~~~~~ +@uifabric/date-time: src/components/WeeklyDayPicker/examples/WeeklyDayPicker.Inline.Example.tsx:22:30 - error TS2339: Property 'wrapper' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 22
+@uifabric/date-time: ~~~~~~~ +@uifabric/date-time: src/components/WeeklyDayPicker/examples/WeeklyDayPicker.Inline.Example.tsx:34:44 - error TS2339: Property 'button' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 34 +@uifabric/date-time: ~~~~~~ +@uifabric/date-time: src/components/WeeklyDayPicker/examples/WeeklyDayPicker.Inline.Example.tsx:35:44 - error TS2339: Property 'button' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 35 +@uifabric/date-time: ~~~~~~ +@uifabric/date-time: src/components/WeeklyDayPicker/examples/WeeklyDayPicker.Inline.Expandable.Example.tsx:27:30 - error TS2339: Property 'wrapper' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 27
+@uifabric/date-time: ~~~~~~~ +@uifabric/date-time: src/components/WeeklyDayPicker/examples/WeeklyDayPicker.Inline.Expandable.Example.tsx:34:31 - error TS2339: Property 'button' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 34 className={styles.button} +@uifabric/date-time: ~~~~~~ +@uifabric/date-time: src/components/WeeklyDayPicker/examples/WeeklyDayPicker.Inline.Expandable.Example.tsx:49:44 - error TS2339: Property 'button' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 49 +@uifabric/date-time: ~~~~~~ +@uifabric/date-time: src/components/WeeklyDayPicker/examples/WeeklyDayPicker.Inline.Expandable.Example.tsx:50:44 - error TS2339: Property 'button' does not exist on type 'typeof import("*.scss")'. +@uifabric/date-time: 50 +@uifabric/date-time: ~~~~~~ +@uifabric/date-time: ../tsx-editor/lib/interfaces/monaco.d.ts:1:25 - error TS2307: Cannot find module '@uifabric/monaco-editor/esm/vs/editor/editor.api' or its corresponding type declarations. +@uifabric/date-time: 1 import * as monaco from '@uifabric/monaco-editor/esm/vs/editor/editor.api'; +@uifabric/date-time: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/date-time: Found 24 errors. +@uifabric/date-time: [XX:XX:XX XM] x ------------------------------------ +@uifabric/date-time: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@uifabric/date-time: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@uifabric/date-time: error Command failed with exit code 1. +@uifabric/experiments: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@uifabric/experiments: [XX:XX:XX XM] x ------------------------------------ +@uifabric/experiments: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/experiments/tsconfig.json" +@uifabric/experiments: at ChildProcess.exithandler (child_process.js:303:12) +@uifabric/experiments: at ChildProcess.emit (events.js:315:20) +@uifabric/experiments: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@uifabric/experiments: at maybeClose (internal/child_process.js:1021:16) +@uifabric/experiments: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@uifabric/experiments: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@uifabric/experiments: [XX:XX:XX XM] x stdout: +@uifabric/experiments: [XX:XX:XX XM] x src/components/FloatingSuggestions/FloatingPeopleSuggestions/defaults/DefaultPeopleSuggestionsItem.tsx:12:72 - error TS2339: Property 'peoplePickerPersonaContent' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 12
+@uifabric/experiments: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/experiments: src/components/FloatingSuggestions/FloatingPeopleSuggestions/defaults/DefaultPeopleSuggestionsItem.tsx:16:64 - error TS2339: Property 'peoplePickerPersona' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 16 className={css('ms-PeoplePicker-Persona', stylesImport.peoplePickerPersona)} +@uifabric/experiments: ~~~~~~~~~~~~~~~~~~~ +@uifabric/experiments: src/components/FloatingSuggestions/FloatingSuggestions.tsx:202:27 - error TS2339: Property 'callout' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 202 className={styles.callout} +@uifabric/experiments: ~~~~~~~ +@uifabric/experiments: src/components/SelectedItemsList/Items/subcomponents/DefaultEditingItem.tsx:75:102 - error TS2339: Property 'editingContainer' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 75 +@uifabric/experiments: ~~~~~~~~~~~~~~~~ +@uifabric/experiments: src/components/SelectedItemsList/Items/subcomponents/DefaultEditingItem.tsx:86:29 - error TS2339: Property 'editingInput' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 86 className={styles.editingInput} +@uifabric/experiments: ~~~~~~~~~~~~ +@uifabric/experiments: src/components/SelectedItemsList/SelectedPeopleList/SelectedPeopleList.test.tsx:135:9 - error TS2322: Type 'ComponentType>' is not assignable to type 'ComponentClass, any> | FunctionComponent> | undefined'. +@uifabric/experiments: Type 'ComponentClass, any>' is not assignable to type 'ComponentClass, any> | FunctionComponent> | undefined'. +@uifabric/experiments: Type 'ComponentClass, any>' is not assignable to type 'ComponentClass, any>'. +@uifabric/experiments: Types of property 'propTypes' are incompatible. +@uifabric/experiments: Type 'WeakValidationMap> | undefined' is not assignable to type 'WeakValidationMap> | undefined'. +@uifabric/experiments: Type 'WeakValidationMap>' is not assignable to type 'WeakValidationMap>'. +@uifabric/experiments: Types of property 'item' are incompatible. +@uifabric/experiments: Type 'Validator | undefined' is not assignable to type 'Validator | undefined'. +@uifabric/experiments: Type 'Validator' is not assignable to type 'Validator'. +@uifabric/experiments: Type 'unknown' is not assignable to type 'IPersonaProps & BaseSelectedItem'. +@uifabric/experiments: Type 'unknown' is not assignable to type 'IPersonaProps'. +@uifabric/experiments: 135 onRenderItem={SelectedItem} +@uifabric/experiments: ~~~~~~~~~~~~ +@uifabric/experiments: src/components/SelectedItemsList/SelectedItemsList.types.ts:75:3 +@uifabric/experiments: 75 onRenderItem?: React.ComponentType>; +@uifabric/experiments: ~~~~~~~~~~~~ +@uifabric/experiments: The expected type comes from property 'onRenderItem' which is declared here on type 'IntrinsicAttributes & Pick, "onChange" | ... 15 more ... | "dropItemsAt"> & RefAttributes<...>' +@uifabric/experiments: src/components/StaticList/StaticList.tsx:14:37 - error TS2339: Property 'root' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 14 { className: css(stylesImport.root, className) }, +@uifabric/experiments: ~~~~ +@uifabric/experiments: src/components/Tile/Tile.tsx:175:97 - error TS2339: Property 'label' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 175 +@uifabric/experiments: ~~~~~ +@uifabric/experiments: src/components/Tile/Tile.tsx:253:68 - error TS2339: Property 'description' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 253 className={css('ms-Tile-description', TileStylesModule.description)} +@uifabric/experiments: ~~~~~~~~~~~ +@uifabric/experiments: src/components/Tile/examples/Tile.Folder.Example.tsx:85:56 - error TS2339: Property 'tileFolder' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 85 +@uifabric/experiments: ~~~~~~~~~~ +@uifabric/experiments: src/components/Tile/examples/Tile.Media.Example.tsx:21:50 - error TS2339: Property 'activityBlock' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 21 +@uifabric/experiments: ~~~~~~~~~~~~~ +@uifabric/experiments: src/components/Tile/examples/Tile.Media.Example.tsx:41:50 - error TS2339: Property 'activityBlock' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 41 +@uifabric/experiments: ~~~~~~~~~~~~~ +@uifabric/experiments: src/components/Tile/examples/Tile.Media.Example.tsx:61:50 - error TS2339: Property 'activityBlock' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 61 +@uifabric/experiments: ~~~~~~~~~~~~~ +@uifabric/experiments: src/components/Tile/examples/Tile.Media.Example.tsx:81:50 - error TS2339: Property 'activityBlock' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 81 +@uifabric/experiments: ~~~~~~~~~~~~~ +@uifabric/experiments: src/components/VirtualizedList/examples/VirtualizedList.Basic.Example.tsx:33:72 - error TS2339: Property 'fixedHeight' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 33 +@uifabric/experiments: ~~~~~~~~~~~ +@uifabric/experiments: src/components/VirtualizedList/examples/VirtualizedList.Basic2.Example.tsx:39:98 - error TS2339: Property 'fixedHeight' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 39 +@uifabric/experiments: ~~~~~~~~~~~ +@uifabric/experiments: src/components/signals/Signal.tsx:15:83 - error TS2339: Property 'signal' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 15 +@uifabric/experiments: ~~~~~~ +@uifabric/experiments: src/components/signals/SignalField.tsx:24:27 - error TS2339: Property 'signalField' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 24 SignalFieldStyles.signalField, +@uifabric/experiments: ~~~~~~~~~~~ +@uifabric/experiments: src/components/signals/SignalField.tsx:26:30 - error TS2339: Property 'wide' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 26 [SignalFieldStyles.wide]: signalsFieldMode === 'wide', +@uifabric/experiments: ~~~~ +@uifabric/experiments: src/components/signals/SignalField.tsx:27:30 - error TS2339: Property 'compact' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 27 [SignalFieldStyles.compact]: signalsFieldMode === 'compact', +@uifabric/experiments: ~~~~~~~ +@uifabric/experiments: src/components/signals/SignalField.tsx:33:42 - error TS2339: Property 'signalFieldValue' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 33 {props.children} +@uifabric/experiments: ~~~~~~~~~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:13:60 - error TS2339: Property 'youCheckedOut' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 13 return ; +@uifabric/experiments: ~~~~~~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:17:60 - error TS2339: Property 'blocked' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 17 return ; +@uifabric/experiments: ~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:24:34 - error TS2339: Property 'missingMetadata' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 24 signalClass={SignalsStyles.missingMetadata} +@uifabric/experiments: ~~~~~~~~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:31:60 - error TS2339: Property 'warning' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 31 return ; +@uifabric/experiments: ~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:35:60 - error TS2339: Property 'awaitingApproval' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 35 return ; +@uifabric/experiments: ~~~~~~~~~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:39:60 - error TS2339: Property 'trending' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 39 return ; +@uifabric/experiments: ~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:43:60 - error TS2339: Property 'someoneCheckedOut' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 43 return ; +@uifabric/experiments: ~~~~~~~~~~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:47:60 - error TS2339: Property 'record' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 47 return ; +@uifabric/experiments: ~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:51:60 - error TS2339: Property 'needsRepublishing' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 51 return ; +@uifabric/experiments: ~~~~~~~~~~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:55:60 - error TS2339: Property 'itemScheduled' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 55 return ; +@uifabric/experiments: ~~~~~~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:65:54 - error TS2339: Property 'signal' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 65 +@uifabric/experiments: ~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:65:76 - error TS2339: Property 'newSignal' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 65 +@uifabric/experiments: ~~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:66:70 - error TS2339: Property 'newIcon' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 66 +@uifabric/experiments: ~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:77:58 - error TS2339: Property 'liveEdit' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 77 return ; +@uifabric/experiments: ~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:81:60 - error TS2339: Property 'mention' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 81 return ; +@uifabric/experiments: ~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:91:42 - error TS2339: Property 'comments' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 91 +@uifabric/experiments: ~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:92:70 - error TS2339: Property 'commentsIcon' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 92 +@uifabric/experiments: ~~~~~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:93:54 - error TS2339: Property 'commentsCount' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 93 {children ? {children} : null} +@uifabric/experiments: ~~~~~~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:102:60 - error TS2339: Property 'unseenReply' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 102 return ; +@uifabric/experiments: ~~~~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:106:60 - error TS2339: Property 'unseenEdit' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 106 return ; +@uifabric/experiments: ~~~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:110:60 - error TS2339: Property 'readOnly' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 110 return ; +@uifabric/experiments: ~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:114:60 - error TS2339: Property 'emailed' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 114 return ; +@uifabric/experiments: ~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:118:60 - error TS2339: Property 'shared' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 118 return ; +@uifabric/experiments: ~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:122:60 - error TS2339: Property 'folder' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 122 return ; +@uifabric/experiments: ~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:126:60 - error TS2339: Property 'folder' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 126 return ; +@uifabric/experiments: ~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:130:60 - error TS2339: Property 'folder' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 130 return ; +@uifabric/experiments: ~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:134:60 - error TS2339: Property 'malwareDetected' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 134 return ; +@uifabric/experiments: ~~~~~~~~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:143:60 - error TS2339: Property 'external' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 143 return ; +@uifabric/experiments: ~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:147:60 - error TS2339: Property 'bookmarkOutline' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 147 return ; +@uifabric/experiments: ~~~~~~~~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:151:60 - error TS2339: Property 'bookmarkFilled' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 151 return ; +@uifabric/experiments: ~~~~~~~~~~~~~~ +@uifabric/experiments: src/components/signals/Signals.tsx:169:82 - error TS2339: Property 'signal' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 169 +@uifabric/experiments: ~~~~~~ +@uifabric/experiments: src/utilities/scrolling/ScrollContainer.tsx:76:68 - error TS2339: Property 'root' does not exist on type 'typeof import("*.scss")'. +@uifabric/experiments: 76 className={css('ms-ScrollContainer', ScrollContainerStyles.root, className)} +@uifabric/experiments: ~~~~ +@uifabric/experiments: Found 53 errors. +@uifabric/experiments: [XX:XX:XX XM] x ------------------------------------ +@uifabric/experiments: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@uifabric/experiments: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@uifabric/experiments: error Command failed with exit code 1. +@uifabric/react-cards: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@uifabric/react-cards: [XX:XX:XX XM] x ------------------------------------ +@uifabric/react-cards: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-cards/tsconfig.json" +@uifabric/react-cards: at ChildProcess.exithandler (child_process.js:303:12) +@uifabric/react-cards: at ChildProcess.emit (events.js:315:20) +@uifabric/react-cards: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@uifabric/react-cards: at maybeClose (internal/child_process.js:1021:16) +@uifabric/react-cards: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@uifabric/react-cards: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@uifabric/react-cards: [XX:XX:XX XM] x stdout: +@uifabric/react-cards: [XX:XX:XX XM] x src/next/Card.stories.tsx:16:57 - error TS2339: Property 'hStack' does not exist on type 'typeof import("*.scss")'. +@uifabric/react-cards: 16 return
; +@uifabric/react-cards: ~~~~~~ +@uifabric/react-cards: src/next/Card.stories.tsx:16:74 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@uifabric/react-cards: 16 return
; +@uifabric/react-cards: ~~~~~~ +@uifabric/react-cards: ../tsx-editor/lib/interfaces/monaco.d.ts:1:25 - error TS2307: Cannot find module '@uifabric/monaco-editor/esm/vs/editor/editor.api' or its corresponding type declarations. +@uifabric/react-cards: 1 import * as monaco from '@uifabric/monaco-editor/esm/vs/editor/editor.api'; +@uifabric/react-cards: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@uifabric/react-cards: Found 3 errors. +@uifabric/react-cards: [XX:XX:XX XM] x ------------------------------------ +@uifabric/react-cards: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@uifabric/react-cards: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@uifabric/react-cards: error Command failed with exit code 1. +@fluentui/react-avatar: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/react-avatar: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-avatar: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-avatar/tsconfig.json" +@fluentui/react-avatar: at ChildProcess.exithandler (child_process.js:303:12) +@fluentui/react-avatar: at ChildProcess.emit (events.js:315:20) +@fluentui/react-avatar: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-avatar: at maybeClose (internal/child_process.js:1021:16) +@fluentui/react-avatar: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-avatar: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@fluentui/react-avatar: [XX:XX:XX XM] x stdout: +@fluentui/react-avatar: [XX:XX:XX XM] x src/components/Avatar/Avatar.tsx:10:38 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'Record'. +@fluentui/react-avatar: 10 const useAvatarClasses = makeClasses(classes); +@fluentui/react-avatar: ~~~~~~~ +@fluentui/react-avatar: src/components/Badge/Badge.tsx:9:44 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'Record'. +@fluentui/react-avatar: Property 'styles' is incompatible with index signature. +@fluentui/react-avatar: Type '{ [className: string]: string; }' is not assignable to type 'string'. +@fluentui/react-avatar: 9 export const useBadgeClasses = makeClasses(classes); +@fluentui/react-avatar: ~~~~~~~ +@fluentui/react-avatar: src/components/utils/StoryExample.tsx:5:27 - error TS2339: Property 'root' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-avatar: 5
+@fluentui/react-avatar: ~~~~ +@fluentui/react-avatar: src/components/utils/StoryExample.tsx:7:29 - error TS2339: Property 'content' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-avatar: 7
{children}
+@fluentui/react-avatar: ~~~~~~~ +@fluentui/react-avatar: Found 4 errors. +@fluentui/react-avatar: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-avatar: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-avatar: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/react-avatar: error Command failed with exit code 1. +@fluentui/react-button: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/react-button: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-button: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-button/tsconfig.json" +@fluentui/react-button: at ChildProcess.exithandler (child_process.js:303:12) +@fluentui/react-button: at ChildProcess.emit (events.js:315:20) +@fluentui/react-button: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-button: at maybeClose (internal/child_process.js:1021:16) +@fluentui/react-button: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-button: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@fluentui/react-button: [XX:XX:XX XM] x stdout: +@fluentui/react-button: [XX:XX:XX XM] x src/components/Button/Button.stories.tsx:12:57 - error TS2339: Property 'hStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-button: 12 return
; +@fluentui/react-button: ~~~~~~ +@fluentui/react-button: src/components/Button/Button.stories.tsx:12:74 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-button: 12 return
; +@fluentui/react-button: ~~~~~~ +@fluentui/react-button: src/components/Button/Button.stories.tsx:19:88 - error TS2339: Property 'text' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-button: 19 const Text = (props: React.PropsWithChildren<{}>) =>

; +@fluentui/react-button: ~~~~ +@fluentui/react-button: src/components/CompoundButton/CompoundButton.stories.tsx:12:57 - error TS2339: Property 'hStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-button: 12 return
; +@fluentui/react-button: ~~~~~~ +@fluentui/react-button: src/components/CompoundButton/CompoundButton.stories.tsx:12:74 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-button: 12 return
; +@fluentui/react-button: ~~~~~~ +@fluentui/react-button: src/components/CompoundButton/CompoundButton.stories.tsx:19:88 - error TS2339: Property 'text' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-button: 19 const Text = (props: React.PropsWithChildren<{}>) =>

; +@fluentui/react-button: ~~~~ +@fluentui/react-button: src/components/MenuButton/MenuButton.stories.tsx:21:27 - error TS2339: Property 'hStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-button: 21
+@fluentui/react-button: ~~~~~~ +@fluentui/react-button: src/components/MenuButton/MenuButton.stories.tsx:52:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-button: 52
+@fluentui/react-button: ~~~~~~ +@fluentui/react-button: src/components/MenuButton/MenuButton.stories.tsx:83:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-button: 83
+@fluentui/react-button: ~~~~~~ +@fluentui/react-button: src/components/SplitButton/SplitButton.stories.tsx:21:27 - error TS2339: Property 'hStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-button: 21
+@fluentui/react-button: ~~~~~~ +@fluentui/react-button: src/components/SplitButton/SplitButton.stories.tsx:52:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-button: 52
+@fluentui/react-button: ~~~~~~ +@fluentui/react-button: src/components/SplitButton/SplitButton.stories.tsx:83:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-button: 83
+@fluentui/react-button: ~~~~~~ +@fluentui/react-button: src/components/ToggleButton/ToggleButton.stories.tsx:8:27 - error TS2339: Property 'hStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-button: 8
+@fluentui/react-button: ~~~~~~ +@fluentui/react-button: src/components/ToggleButton/ToggleButton.stories.tsx:39:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-button: 39
+@fluentui/react-button: ~~~~~~ +@fluentui/react-button: src/components/ToggleButton/ToggleButton.stories.tsx:67:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-button: 67
+@fluentui/react-button: ~~~~~~ +@fluentui/react-button: src/components/ToggleButton/ToggleButton.stories.tsx:76:29 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-button: 76
+@fluentui/react-button: ~~~~~~ +@fluentui/react-button: ../tsx-editor/lib/interfaces/monaco.d.ts:1:25 - error TS2307: Cannot find module '@uifabric/monaco-editor/esm/vs/editor/editor.api' or its corresponding type declarations. +@fluentui/react-button: 1 import * as monaco from '@uifabric/monaco-editor/esm/vs/editor/editor.api'; +@fluentui/react-button: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-button: Found 17 errors. +@fluentui/react-button: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-button: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-button: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/react-button: error Command failed with exit code 1. +@fluentui/react-checkbox: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/react-checkbox: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-checkbox: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-checkbox/tsconfig.json" +@fluentui/react-checkbox: at ChildProcess.exithandler (child_process.js:303:12) +@fluentui/react-checkbox: at ChildProcess.emit (events.js:315:20) +@fluentui/react-checkbox: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-checkbox: at maybeClose (internal/child_process.js:1021:16) +@fluentui/react-checkbox: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-checkbox: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@fluentui/react-checkbox: [XX:XX:XX XM] x stdout: +@fluentui/react-checkbox: [XX:XX:XX XM] x src/next/useCheckboxClasses.tsx:15:50 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'Record'. +@fluentui/react-checkbox: Property 'styles' is incompatible with index signature. +@fluentui/react-checkbox: Type '{ [className: string]: string; }' is not assignable to type 'string'. +@fluentui/react-checkbox: 15 const defaultClassResolver = createClassResolver(classes); +@fluentui/react-checkbox: ~~~~~~~ +@fluentui/react-checkbox: Found 1 error. +@fluentui/react-checkbox: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-checkbox: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-checkbox: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/react-checkbox: error Command failed with exit code 1. +@fluentui/react-image: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/react-image: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-image: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-image/tsconfig.json" +@fluentui/react-image: at ChildProcess.exithandler (child_process.js:303:12) +@fluentui/react-image: at ChildProcess.emit (events.js:315:20) +@fluentui/react-image: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-image: at maybeClose (internal/child_process.js:1021:16) +@fluentui/react-image: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-image: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@fluentui/react-image: [XX:XX:XX XM] x stdout: +@fluentui/react-image: [XX:XX:XX XM] x src/components/Image/Image.stories.tsx:12:57 - error TS2339: Property 'hStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-image: 12 return
; +@fluentui/react-image: ~~~~~~ +@fluentui/react-image: src/components/Image/Image.stories.tsx:12:74 - error TS2339: Property 'vStack' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-image: 12 return
; +@fluentui/react-image: ~~~~~~ +@fluentui/react-image: src/components/Image/Image.tsx:9:44 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'Record'. +@fluentui/react-image: Property 'styles' is incompatible with index signature. +@fluentui/react-image: Type '{ [className: string]: string; }' is not assignable to type 'string'. +@fluentui/react-image: 9 export const useImageClasses = makeClasses(classes); +@fluentui/react-image: ~~~~~~~ +@fluentui/react-image: Found 3 errors. +@fluentui/react-image: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-image: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-image: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/react-image: error Command failed with exit code 1. +@fluentui/react-link: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/react-link: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-link: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-link/tsconfig.json" +@fluentui/react-link: at ChildProcess.exithandler (child_process.js:303:12) +@fluentui/react-link: at ChildProcess.emit (events.js:315:20) +@fluentui/react-link: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-link: at maybeClose (internal/child_process.js:1021:16) +@fluentui/react-link: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-link: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@fluentui/react-link: [XX:XX:XX XM] x stdout: +@fluentui/react-link: [XX:XX:XX XM] x src/next/Link.tsx:16:56 - error TS2339: Property 'button' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-link: 16 const propControlledClasses = [isButton && classes.button, isDisabled && classes.disabled]; +@fluentui/react-link: ~~~~~~ +@fluentui/react-link: src/next/Link.tsx:16:86 - error TS2339: Property 'disabled' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-link: 16 const propControlledClasses = [isButton && classes.button, isDisabled && classes.disabled]; +@fluentui/react-link: ~~~~~~~~ +@fluentui/react-link: src/next/Link.tsx:21:36 - error TS2339: Property 'root' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-link: 21 root: css(className, classes.root, globalClassNames.root, ...rootStaticClasses, ...propControlledClasses), +@fluentui/react-link: ~~~~ +@fluentui/react-link: Found 3 errors. +@fluentui/react-link: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-link: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-link: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/react-link: error Command failed with exit code 1. +@fluentui/react-slider: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/react-slider: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-slider: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-slider/tsconfig.json" +@fluentui/react-slider: at ChildProcess.exithandler (child_process.js:303:12) +@fluentui/react-slider: at ChildProcess.emit (events.js:315:20) +@fluentui/react-slider: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-slider: at maybeClose (internal/child_process.js:1021:16) +@fluentui/react-slider: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-slider: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@fluentui/react-slider: [XX:XX:XX XM] x stdout: +@fluentui/react-slider: [XX:XX:XX XM] x src/next/Slider.tsx:38:27 - error TS2339: Property 'disabled' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-slider: 38 disabled && classes.disabled, +@fluentui/react-slider: ~~~~~~~~ +@fluentui/react-slider: src/next/Slider.tsx:39:27 - error TS2339: Property 'vertical' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-slider: 39 vertical && classes.vertical, +@fluentui/react-slider: ~~~~~~~~ +@fluentui/react-slider: src/next/Slider.tsx:46:36 - error TS2339: Property 'root' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-slider: 46 root: css(className, classes.root, globalClassNames.root, ...propClasses), +@fluentui/react-slider: ~~~~ +@fluentui/react-slider: src/next/Slider.tsx:47:30 - error TS2339: Property 'container' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-slider: 47 container: css(classes.container, globalClassNames.container, ...propClasses), +@fluentui/react-slider: ~~~~~~~~~ +@fluentui/react-slider: src/next/Slider.tsx:48:29 - error TS2339: Property 'slideBox' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-slider: 48 slideBox: css(classes.slideBox, globalClassNames.slideBox, ...propClasses), +@fluentui/react-slider: ~~~~~~~~ +@fluentui/react-slider: src/next/Slider.tsx:49:25 - error TS2339: Property 'line' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-slider: 49 line: css(classes.line, globalClassNames.line, ...propClasses), +@fluentui/react-slider: ~~~~ +@fluentui/react-slider: src/next/Slider.tsx:50:26 - error TS2339: Property 'thumb' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-slider: 50 thumb: css(classes.thumb, globalClassNames.thumb, ...propClasses), +@fluentui/react-slider: ~~~~~ +@fluentui/react-slider: src/next/Slider.tsx:51:34 - error TS2339: Property 'activeSection' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-slider: 51 activeSection: css(classes.activeSection, globalClassNames.activeSection, ...propClasses), +@fluentui/react-slider: ~~~~~~~~~~~~~ +@fluentui/react-slider: src/next/Slider.tsx:52:36 - error TS2339: Property 'inactiveSection' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-slider: 52 inactiveSection: css(classes.inactiveSection, globalClassNames.inactiveSection, ...propClasses), +@fluentui/react-slider: ~~~~~~~~~~~~~~~ +@fluentui/react-slider: src/next/Slider.tsx:53:34 - error TS2339: Property 'lineContainer' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-slider: 53 lineContainer: css(classes.lineContainer, ...propClasses), +@fluentui/react-slider: ~~~~~~~~~~~~~ +@fluentui/react-slider: src/next/Slider.tsx:54:31 - error TS2339: Property 'valueLabel' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-slider: 54 valueLabel: css(classes.valueLabel, globalClassNames.valueLabel, ...propClasses), +@fluentui/react-slider: ~~~~~~~~~~ +@fluentui/react-slider: src/next/Slider.tsx:55:31 - error TS2339: Property 'titleLabel' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-slider: 55 titleLabel: css(classes.titleLabel, titleLabelClassName, ...propClasses), +@fluentui/react-slider: ~~~~~~~~~~ +@fluentui/react-slider: src/next/Slider.tsx:57:29 - error TS2339: Property 'zeroTick' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-slider: 57 zeroTick: css(classes.zeroTick, globalClassNames.zeroTick, ...propClasses), +@fluentui/react-slider: ~~~~~~~~ +@fluentui/react-slider: Found 13 errors. +@fluentui/react-slider: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-slider: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-slider: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/react-slider: error Command failed with exit code 1. +@fluentui/react-tabs: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/react-tabs: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-tabs: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-tabs/tsconfig.json" +@fluentui/react-tabs: at ChildProcess.exithandler (child_process.js:303:12) +@fluentui/react-tabs: at ChildProcess.emit (events.js:315:20) +@fluentui/react-tabs: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-tabs: at maybeClose (internal/child_process.js:1021:16) +@fluentui/react-tabs: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-tabs: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@fluentui/react-tabs: [XX:XX:XX XM] x stdout: +@fluentui/react-tabs: [XX:XX:XX XM] x src/next/Pivot.tsx:33:39 - error TS2339: Property 'linkSize_large' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-tabs: 33 linkSize === 'large' && classes.linkSize_large, +@fluentui/react-tabs: ~~~~~~~~~~~~~~ +@fluentui/react-tabs: src/next/Pivot.tsx:34:40 - error TS2339: Property 'linkFormat_tabs' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-tabs: 34 linkFormat === 'tabs' && classes.linkFormat_tabs, +@fluentui/react-tabs: ~~~~~~~~~~~~~~~ +@fluentui/react-tabs: src/next/Pivot.tsx:40:17 - error TS2339: Property 'root' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-tabs: 40 classes.root, +@fluentui/react-tabs: ~~~~ +@fluentui/react-tabs: src/next/Pivot.tsx:46:25 - error TS2339: Property 'link' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-tabs: 46 link: css(classes.link, globalClassNames.link, ...modifierClasses), +@fluentui/react-tabs: ~~~~ +@fluentui/react-tabs: src/next/Pivot.tsx:47:31 - error TS2339: Property 'linkInMenu' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-tabs: 47 linkInMenu: css(classes.linkInMenu, globalClassNames.linkInMenu, ...modifierClasses), +@fluentui/react-tabs: ~~~~~~~~~~ +@fluentui/react-tabs: src/next/Pivot.tsx:49:35 - error TS2339: Property 'linkIsSelected' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-tabs: 49 linkIsSelected: css(classes.linkIsSelected, globalClassNames.linkIsSelected), +@fluentui/react-tabs: ~~~~~~~~~~~~~~ +@fluentui/react-tabs: src/next/Pivot.tsx:50:32 - error TS2339: Property 'linkContent' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-tabs: 50 linkContent: css(classes.linkContent, globalClassNames.linkContent, ...modifierClasses), +@fluentui/react-tabs: ~~~~~~~~~~~ +@fluentui/react-tabs: src/next/Pivot.tsx:51:25 - error TS2339: Property 'text' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-tabs: 51 text: css(classes.text, globalClassNames.text, ...modifierClasses), +@fluentui/react-tabs: ~~~~ +@fluentui/react-tabs: src/next/Pivot.tsx:52:26 - error TS2339: Property 'count' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-tabs: 52 count: css(classes.count, globalClassNames.count, ...modifierClasses), +@fluentui/react-tabs: ~~~~~ +@fluentui/react-tabs: src/next/Pivot.tsx:54:34 - error TS2339: Property 'itemContainer' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-tabs: 54 itemContainer: css(classes.itemContainer, ...modifierClasses), +@fluentui/react-tabs: ~~~~~~~~~~~~~ +@fluentui/react-tabs: src/next/Pivot.tsx:55:39 - error TS2339: Property 'overflowMenuButton' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-tabs: 55 overflowMenuButton: css(classes.overflowMenuButton, globalClassNames.overflowMenuButton, ...modifierClasses), +@fluentui/react-tabs: ~~~~~~~~~~~~~~~~~~ +@fluentui/react-tabs: Found 11 errors. +@fluentui/react-tabs: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-tabs: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-tabs: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/react-tabs: error Command failed with exit code 1. +@fluentui/react-toggle: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@fluentui/react-toggle: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-toggle: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/react-toggle/tsconfig.json" +@fluentui/react-toggle: at ChildProcess.exithandler (child_process.js:303:12) +@fluentui/react-toggle: at ChildProcess.emit (events.js:315:20) +@fluentui/react-toggle: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-toggle: at maybeClose (internal/child_process.js:1021:16) +@fluentui/react-toggle: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-toggle: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@fluentui/react-toggle: [XX:XX:XX XM] x stdout: +@fluentui/react-toggle: [XX:XX:XX XM] x src/next/Toggle.tsx:31:26 - error TS2339: Property 'checked' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-toggle: 31 checked && classes.checked, +@fluentui/react-toggle: ~~~~~~~ +@fluentui/react-toggle: src/next/Toggle.tsx:32:27 - error TS2339: Property 'disabled' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-toggle: 32 disabled && classes.disabled, +@fluentui/react-toggle: ~~~~~~~~ +@fluentui/react-toggle: src/next/Toggle.tsx:33:30 - error TS2339: Property 'inlineLabel' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-toggle: 33 inlineLabel && classes.inlineLabel, +@fluentui/react-toggle: ~~~~~~~~~~~ +@fluentui/react-toggle: src/next/Toggle.tsx:34:31 - error TS2339: Property 'onOffMissing' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-toggle: 34 onOffMissing && classes.onOffMissing, +@fluentui/react-toggle: ~~~~~~~~~~~~ +@fluentui/react-toggle: src/next/Toggle.tsx:40:36 - error TS2339: Property 'root' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-toggle: 40 root: css(className, classes.root, globalClassNames.root, ...rootStaticClasses, ...propControlledClasses), +@fluentui/react-toggle: ~~~~ +@fluentui/react-toggle: src/next/Toggle.tsx:41:26 - error TS2339: Property 'label' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-toggle: 41 label: css(classes.label, globalClassNames.label, ...propControlledClasses), +@fluentui/react-toggle: ~~~~~ +@fluentui/react-toggle: src/next/Toggle.tsx:42:30 - error TS2339: Property 'container' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-toggle: 42 container: css(classes.container, globalClassNames.container, ...propControlledClasses), +@fluentui/react-toggle: ~~~~~~~~~ +@fluentui/react-toggle: src/next/Toggle.tsx:43:25 - error TS2339: Property 'pill' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-toggle: 43 pill: css(classes.pill, globalClassNames.pill, ...propControlledClasses), +@fluentui/react-toggle: ~~~~ +@fluentui/react-toggle: src/next/Toggle.tsx:44:26 - error TS2339: Property 'thumb' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-toggle: 44 thumb: css(classes.thumb, globalClassNames.thumb, ...propControlledClasses), +@fluentui/react-toggle: ~~~~~ +@fluentui/react-toggle: src/next/Toggle.tsx:45:25 - error TS2339: Property 'text' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-toggle: 45 text: css(classes.text, globalClassNames.text, ...propControlledClasses), +@fluentui/react-toggle: ~~~~ +@fluentui/react-toggle: Found 10 errors. +@fluentui/react-toggle: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-toggle: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-toggle: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@fluentui/react-toggle: error Command failed with exit code 1. +theming-designer: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +theming-designer: [XX:XX:XX XM] x ------------------------------------ +theming-designer: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/apps/theming-designer/tsconfig.json" +theming-designer: at ChildProcess.exithandler (child_process.js:303:12) +theming-designer: at ChildProcess.emit (events.js:315:20) +theming-designer: at ChildProcess.EventEmitter.emit (domain.js:506:15) +theming-designer: at maybeClose (internal/child_process.js:1021:16) +theming-designer: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +theming-designer: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +theming-designer: [XX:XX:XX XM] x stdout: +theming-designer: [XX:XX:XX XM] x ../../packages/tsx-editor/lib/interfaces/monaco.d.ts:1:25 - error TS2307: Cannot find module '@uifabric/monaco-editor/esm/vs/editor/editor.api' or its corresponding type declarations. +theming-designer: 1 import * as monaco from '@uifabric/monaco-editor/esm/vs/editor/editor.api'; +theming-designer: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +theming-designer: Found 1 error. +theming-designer: [XX:XX:XX XM] x ------------------------------------ +theming-designer: [XX:XX:XX XM] x Error previously detected. See above for error messages. +theming-designer: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +theming-designer: error Command failed with exit code 1. +@uifabric/api-docs: [XX:XX:XX XM] x Error detected while running '_wrapFunction' +@uifabric/api-docs: [XX:XX:XX XM] x ------------------------------------ +@uifabric/api-docs: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib-commonjs --module commonjs --project "/office-ui-fabric-react/packages/api-docs/tsconfig.json" +@uifabric/api-docs: at ChildProcess.exithandler (child_process.js:303:12) +@uifabric/api-docs: at ChildProcess.emit (events.js:315:20) +@uifabric/api-docs: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@uifabric/api-docs: at maybeClose (internal/child_process.js:1021:16) +@uifabric/api-docs: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@uifabric/api-docs: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@uifabric/api-docs: [XX:XX:XX XM] x stdout: +@uifabric/api-docs: [XX:XX:XX XM] x src/tableJson.ts:52:9 - error TS2322: Type 'readonly HeritageType[] | undefined' is not assignable to type 'HeritageType[] | undefined'. +@uifabric/api-docs: The type 'readonly HeritageType[]' is 'readonly' and cannot be assigned to the mutable type 'HeritageType[]'. +@uifabric/api-docs: 52 const extendsArr: HeritageType[] | undefined = +@uifabric/api-docs: ~~~~~~~~~~ +@uifabric/api-docs: Found 1 error. +@uifabric/api-docs: [XX:XX:XX XM] x ------------------------------------ +@uifabric/api-docs: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@uifabric/api-docs: [XX:XX:XX XM] x Other tasks that did not complete: [ts:esm] +@uifabric/api-docs: error Command failed with exit code 1. +@fluentui/react-flex: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/react-flex: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-flex: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-flex/tsconfig.json" +@fluentui/react-flex: at ChildProcess.exithandler (child_process.js:303:12) +@fluentui/react-flex: at ChildProcess.emit (events.js:315:20) +@fluentui/react-flex: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-flex: at maybeClose (internal/child_process.js:1021:16) +@fluentui/react-flex: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-flex: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@fluentui/react-flex: [XX:XX:XX XM] x stdout: +@fluentui/react-flex: [XX:XX:XX XM] x src/components/Flex/Flex.tsx:22:34 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'Record'. +@fluentui/react-flex: Property 'styles' is incompatible with index signature. +@fluentui/react-flex: Type '{ [className: string]: string; }' is not assignable to type 'string'. +@fluentui/react-flex: 22 classes: createClassResolver(classes), +@fluentui/react-flex: ~~~~~~~ +@fluentui/react-flex: src/components/FlexItem/FlexItem.tsx:20:34 - error TS2345: Argument of type 'typeof import("*.scss")' is not assignable to parameter of type 'Record'. +@fluentui/react-flex: 20 classes: createClassResolver(classes), +@fluentui/react-flex: ~~~~~~~ +@fluentui/react-flex: Found 2 errors. +@fluentui/react-flex: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-flex: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-flex: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/react-flex: error Command failed with exit code 1. +@fluentui/react-next: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@fluentui/react-next: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-next: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/packages/react-next/tsconfig.json" +@fluentui/react-next: at ChildProcess.exithandler (child_process.js:303:12) +@fluentui/react-next: at ChildProcess.emit (events.js:315:20) +@fluentui/react-next: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@fluentui/react-next: at maybeClose (internal/child_process.js:1021:16) +@fluentui/react-next: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +@fluentui/react-next: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +@fluentui/react-next: [XX:XX:XX XM] x stdout: +@fluentui/react-next: [XX:XX:XX XM] x ../office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroup.base.tsx:147:19 - error TS2783: 'key' is specified more than once, so this usage will be overwritten. +@fluentui/react-next: 147 key={option.key} +@fluentui/react-next: ~~~~~~~~~~~~~~~~ +@fluentui/react-next: ../office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroup.base.tsx:151:19 +@fluentui/react-next: 151 {...innerOptionProps} +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: This spread always overwrites this property. +@fluentui/react-next: ../office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroupOption/ChoiceGroupOption.base.tsx:82:38 - error TS2554: Expected 1 arguments, but got 2. +@fluentui/react-next: 82 {onRenderField(this.props, this._onRenderField)} +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: ../office-ui-fabric-react/src/components/ComboBox/ComboBox.tsx:421:13 - error TS2554: Expected 1 arguments, but got 2. +@fluentui/react-next: 421 this._onRenderContainer, +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: ../office-ui-fabric-react/src/components/DetailsList/DetailsColumn.base.tsx:194:14 - error TS2790: The operand of a 'delete' operator must be optional. +@fluentui/react-next: 194 delete this._dragDropSubscription; +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: ../office-ui-fabric-react/src/components/DetailsList/DetailsColumn.base.tsx:208:14 - error TS2790: The operand of a 'delete' operator must be optional. +@fluentui/react-next: 208 delete this._dragDropSubscription; +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: ../office-ui-fabric-react/src/components/DetailsList/DetailsHeader.base.tsx:132:14 - error TS2790: The operand of a 'delete' operator must be optional. +@fluentui/react-next: 132 delete this._subscriptionObject; +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: ../office-ui-fabric-react/src/components/DetailsList/DetailsHeader.base.tsx:154:14 - error TS2790: The operand of a 'delete' operator must be optional. +@fluentui/react-next: 154 delete this._subscriptionObject; +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: ../office-ui-fabric-react/src/components/DetailsList/DetailsRow.base.tsx:109:16 - error TS2790: The operand of a 'delete' operator must be optional. +@fluentui/react-next: 109 delete this._dragDropSubscription; +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: ../office-ui-fabric-react/src/components/DetailsList/DetailsRow.base.tsx:147:14 - error TS2790: The operand of a 'delete' operator must be optional. +@fluentui/react-next: 147 delete this._dragDropSubscription; +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: ../office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/PeoplePickerItems/SuggestionItemDefault.tsx:12:72 - error TS2339: Property 'peoplePickerPersonaContent' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-next: 12
+@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: ../office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/PeoplePickerItems/SuggestionItemDefault.tsx:16:64 - error TS2339: Property 'peoplePickerPersona' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-next: 16 className={css('ms-PeoplePicker-Persona', stylesImport.peoplePickerPersona)} +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: ../office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.tsx:106:12 - error TS2790: The operand of a 'delete' operator must be optional. +@fluentui/react-next: 106 delete this._previouslyFocusedElementOutsideTrapZone; +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: ../office-ui-fabric-react/src/components/GroupedList/GroupedListSection.tsx:174:16 - error TS2790: The operand of a 'delete' operator must be optional. +@fluentui/react-next: 174 delete this._dragDropSubscription; +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: ../office-ui-fabric-react/src/components/List/List.tsx:340:12 - error TS2790: The operand of a 'delete' operator must be optional. +@fluentui/react-next: 340 delete this._scrollElement; +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: ../office-ui-fabric-react/src/components/MarqueeSelection/MarqueeSelection.base.tsx:88:12 - error TS2790: The operand of a 'delete' operator must be optional. +@fluentui/react-next: 88 delete this._scrollableParent; +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: ../office-ui-fabric-react/src/components/MarqueeSelection/MarqueeSelection.base.tsx:89:12 - error TS2790: The operand of a 'delete' operator must be optional. +@fluentui/react-next: 89 delete this._scrollableSurface; +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: ../office-ui-fabric-react/src/components/Popup/Popup.tsx:79:12 - error TS2790: The operand of a 'delete' operator must be optional. +@fluentui/react-next: 79 delete this._originalFocusedElement; +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: src/components/ComboBox/ComboBox.tsx:465:13 - error TS2554: Expected 1 arguments, but got 2. +@fluentui/react-next: 465 this._onRenderContainer, +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: src/components/FloatingPicker/PeoplePicker/PeoplePickerItems/SuggestionItemDefault.tsx:12:72 - error TS2339: Property 'peoplePickerPersonaContent' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-next: 12
+@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: src/components/FloatingPicker/PeoplePicker/PeoplePickerItems/SuggestionItemDefault.tsx:16:64 - error TS2339: Property 'peoplePickerPersona' does not exist on type 'typeof import("*.scss")'. +@fluentui/react-next: 16 className={css('ms-PeoplePicker-Persona', stylesImport.peoplePickerPersona)} +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: src/components/FocusTrapZone/FocusTrapZone.tsx:90:12 - error TS2790: The operand of a 'delete' operator must be optional. +@fluentui/react-next: 90 delete this._previouslyFocusedElementOutsideTrapZone; +@fluentui/react-next: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +@fluentui/react-next: src/components/Persona/Persona.test.tsx:194:13 - error TS2322: Type 'ReactWrapper>' is not assignable to type 'ReactWrapper, unknown, Component<{}, {}, any>>'. +@fluentui/react-next: Type 'HTMLAttributes' is not assignable to type 'ImgHTMLAttributes'. +@fluentui/react-next: Types of property 'crossOrigin' are incompatible. +@fluentui/react-next: Type 'string | undefined' is not assignable to type '"" | "anonymous" | "use-credentials" | undefined'. +@fluentui/react-next: Type 'string' is not assignable to type '"" | "anonymous" | "use-credentials" | undefined'. +@fluentui/react-next: 194 const image: ReactWrapper, unknown> = wrapper.find('ImageBase'); +@fluentui/react-next: ~~~~~ +@fluentui/react-next: src/components/Persona/Persona.test.tsx:201:13 - error TS2322: Type 'ReactWrapper>' is not assignable to type 'ReactWrapper, unknown, Component<{}, {}, any>>'. +@fluentui/react-next: 201 const image: ReactWrapper, unknown> = wrapper.find('ImageBase'); +@fluentui/react-next: ~~~~~ +@fluentui/react-next: Found 23 errors. +@fluentui/react-next: [XX:XX:XX XM] x ------------------------------------ +@fluentui/react-next: [XX:XX:XX XM] x Error previously detected. See above for error messages. +@fluentui/react-next: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +@fluentui/react-next: error Command failed with exit code 1. +codesandbox-react-next-template: [XX:XX:XX XM] x Error detected while running 'ts:esm' +codesandbox-react-next-template: [XX:XX:XX XM] x ------------------------------------ +codesandbox-react-next-template: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/codesandbox-react-next-template/tsconfig.json" +codesandbox-react-next-template: at ChildProcess.exithandler (child_process.js:303:12) +codesandbox-react-next-template: at ChildProcess.emit (events.js:315:20) +codesandbox-react-next-template: at ChildProcess.EventEmitter.emit (domain.js:506:15) +codesandbox-react-next-template: at maybeClose (internal/child_process.js:1021:16) +codesandbox-react-next-template: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +codesandbox-react-next-template: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +codesandbox-react-next-template: [XX:XX:XX XM] x stdout: +codesandbox-react-next-template: [XX:XX:XX XM] x ../../packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroup.base.tsx:147:19 - error TS2783: 'key' is specified more than once, so this usage will be overwritten. +codesandbox-react-next-template: 147 key={option.key} +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroup.base.tsx:151:19 +codesandbox-react-next-template: 151 {...innerOptionProps} +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: This spread always overwrites this property. +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroupOption/ChoiceGroupOption.base.tsx:82:38 - error TS2554: Expected 1 arguments, but got 2. +codesandbox-react-next-template: 82 {onRenderField(this.props, this._onRenderField)} +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/ComboBox/ComboBox.tsx:421:13 - error TS2554: Expected 1 arguments, but got 2. +codesandbox-react-next-template: 421 this._onRenderContainer, +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsColumn.base.tsx:194:14 - error TS2790: The operand of a 'delete' operator must be optional. +codesandbox-react-next-template: 194 delete this._dragDropSubscription; +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsColumn.base.tsx:208:14 - error TS2790: The operand of a 'delete' operator must be optional. +codesandbox-react-next-template: 208 delete this._dragDropSubscription; +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.base.tsx:132:14 - error TS2790: The operand of a 'delete' operator must be optional. +codesandbox-react-next-template: 132 delete this._subscriptionObject; +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.base.tsx:154:14 - error TS2790: The operand of a 'delete' operator must be optional. +codesandbox-react-next-template: 154 delete this._subscriptionObject; +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsRow.base.tsx:109:16 - error TS2790: The operand of a 'delete' operator must be optional. +codesandbox-react-next-template: 109 delete this._dragDropSubscription; +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsRow.base.tsx:147:14 - error TS2790: The operand of a 'delete' operator must be optional. +codesandbox-react-next-template: 147 delete this._dragDropSubscription; +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/PeoplePickerItems/SuggestionItemDefault.tsx:12:72 - error TS2339: Property 'peoplePickerPersonaContent' does not exist on type 'typeof import("*.scss")'. +codesandbox-react-next-template: 12
+codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/PeoplePickerItems/SuggestionItemDefault.tsx:16:64 - error TS2339: Property 'peoplePickerPersona' does not exist on type 'typeof import("*.scss")'. +codesandbox-react-next-template: 16 className={css('ms-PeoplePicker-Persona', stylesImport.peoplePickerPersona)} +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.tsx:106:12 - error TS2790: The operand of a 'delete' operator must be optional. +codesandbox-react-next-template: 106 delete this._previouslyFocusedElementOutsideTrapZone; +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/GroupedList/GroupedListSection.tsx:174:16 - error TS2790: The operand of a 'delete' operator must be optional. +codesandbox-react-next-template: 174 delete this._dragDropSubscription; +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/List/List.tsx:340:12 - error TS2790: The operand of a 'delete' operator must be optional. +codesandbox-react-next-template: 340 delete this._scrollElement; +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/MarqueeSelection/MarqueeSelection.base.tsx:88:12 - error TS2790: The operand of a 'delete' operator must be optional. +codesandbox-react-next-template: 88 delete this._scrollableParent; +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/MarqueeSelection/MarqueeSelection.base.tsx:89:12 - error TS2790: The operand of a 'delete' operator must be optional. +codesandbox-react-next-template: 89 delete this._scrollableSurface; +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: ../../packages/office-ui-fabric-react/src/components/Popup/Popup.tsx:79:12 - error TS2790: The operand of a 'delete' operator must be optional. +codesandbox-react-next-template: 79 delete this._originalFocusedElement; +codesandbox-react-next-template: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +codesandbox-react-next-template: Found 17 errors. +codesandbox-react-next-template: [XX:XX:XX XM] x ------------------------------------ +codesandbox-react-next-template: [XX:XX:XX XM] x Error previously detected. See above for error messages. +codesandbox-react-next-template: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +codesandbox-react-next-template: error Command failed with exit code 1. +perf-test: [XX:XX:XX XM] x Error detected while running 'ts:esm' +perf-test: [XX:XX:XX XM] x ------------------------------------ +perf-test: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/perf-test/tsconfig.json" +perf-test: at ChildProcess.exithandler (child_process.js:303:12) +perf-test: at ChildProcess.emit (events.js:315:20) +perf-test: at ChildProcess.EventEmitter.emit (domain.js:506:15) +perf-test: at maybeClose (internal/child_process.js:1021:16) +perf-test: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +perf-test: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +perf-test: [XX:XX:XX XM] x stdout: +perf-test: [XX:XX:XX XM] x ../../packages/office-ui-fabric-react/src/components/Calendar/Calendar.tsx:22:31 - error TS2307: Cannot find module './Calendar.scss' or its corresponding type declarations. +perf-test: 22 import * as stylesImport from './Calendar.scss'; +perf-test: ~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/Calendar/CalendarDay.tsx:32:31 - error TS2307: Cannot find module './Calendar.scss' or its corresponding type declarations. +perf-test: 32 import * as stylesImport from './Calendar.scss'; +perf-test: ~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/Calendar/CalendarMonth.tsx:15:31 - error TS2307: Cannot find module './Calendar.scss' or its corresponding type declarations. +perf-test: 15 import * as stylesImport from './Calendar.scss'; +perf-test: ~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/Calendar/CalendarYear.tsx:5:31 - error TS2307: Cannot find module './Calendar.scss' or its corresponding type declarations. +perf-test: 5 import * as stylesImport from './Calendar.scss'; +perf-test: ~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroup.base.tsx:147:19 - error TS2783: 'key' is specified more than once, so this usage will be overwritten. +perf-test: 147 key={option.key} +perf-test: ~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroup.base.tsx:151:19 +perf-test: 151 {...innerOptionProps} +perf-test: ~~~~~~~~~~~~~~~~~~~~~ +perf-test: This spread always overwrites this property. +perf-test: ../../packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroupOption/ChoiceGroupOption.base.tsx:82:38 - error TS2554: Expected 1 arguments, but got 2. +perf-test: 82 {onRenderField(this.props, this._onRenderField)} +perf-test: ~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/ComboBox/ComboBox.tsx:421:13 - error TS2554: Expected 1 arguments, but got 2. +perf-test: 421 this._onRenderContainer, +perf-test: ~~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsColumn.base.tsx:194:14 - error TS2790: The operand of a 'delete' operator must be optional. +perf-test: 194 delete this._dragDropSubscription; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsColumn.base.tsx:208:14 - error TS2790: The operand of a 'delete' operator must be optional. +perf-test: 208 delete this._dragDropSubscription; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.base.tsx:132:14 - error TS2790: The operand of a 'delete' operator must be optional. +perf-test: 132 delete this._subscriptionObject; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.base.tsx:154:14 - error TS2790: The operand of a 'delete' operator must be optional. +perf-test: 154 delete this._subscriptionObject; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsRow.base.tsx:109:16 - error TS2790: The operand of a 'delete' operator must be optional. +perf-test: 109 delete this._dragDropSubscription; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsRow.base.tsx:147:14 - error TS2790: The operand of a 'delete' operator must be optional. +perf-test: 147 delete this._dragDropSubscription; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/ExtendedPicker/BaseExtendedPicker.tsx:5:31 - error TS2307: Cannot find module './BaseExtendedPicker.scss' or its corresponding type declarations. +perf-test: 5 import * as stylesImport from './BaseExtendedPicker.scss'; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/FloatingPicker/BaseFloatingPicker.tsx:2:31 - error TS2307: Cannot find module './BaseFloatingPicker.scss' or its corresponding type declarations. +perf-test: 2 import * as stylesImport from './BaseFloatingPicker.scss'; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/PeoplePickerItems/SuggestionItemDefault.tsx:5:31 - error TS2307: Cannot find module '../PeoplePicker.scss' or its corresponding type declarations. +perf-test: 5 import * as stylesImport from '../PeoplePicker.scss'; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/FloatingPicker/Suggestions/SuggestionsControl.tsx:12:31 - error TS2307: Cannot find module './SuggestionsControl.scss' or its corresponding type declarations. +perf-test: 12 import * as stylesImport from './SuggestionsControl.scss'; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/FloatingPicker/Suggestions/SuggestionsCore.tsx:5:31 - error TS2307: Cannot find module './SuggestionsCore.scss' or its corresponding type declarations. +perf-test: 5 import * as stylesImport from './SuggestionsCore.scss'; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.tsx:106:12 - error TS2790: The operand of a 'delete' operator must be optional. +perf-test: 106 delete this._previouslyFocusedElementOutsideTrapZone; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/GroupedList/GroupedListSection.tsx:174:16 - error TS2790: The operand of a 'delete' operator must be optional. +perf-test: 174 delete this._dragDropSubscription; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/List/List.tsx:340:12 - error TS2790: The operand of a 'delete' operator must be optional. +perf-test: 340 delete this._scrollElement; +perf-test: ~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/MarqueeSelection/MarqueeSelection.base.tsx:88:12 - error TS2790: The operand of a 'delete' operator must be optional. +perf-test: 88 delete this._scrollableParent; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/MarqueeSelection/MarqueeSelection.base.tsx:89:12 - error TS2790: The operand of a 'delete' operator must be optional. +perf-test: 89 delete this._scrollableSurface; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/Popup/Popup.tsx:79:12 - error TS2790: The operand of a 'delete' operator must be optional. +perf-test: 79 delete this._originalFocusedElement; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/SelectedItemsList/SelectedPeopleList/Items/ExtendedSelectedItem.tsx:6:31 - error TS2307: Cannot find module './ExtendedSelectedItem.scss' or its corresponding type declarations. +perf-test: 6 import * as stylesImport from './ExtendedSelectedItem.scss'; +perf-test: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/pickers/BasePicker.tsx:34:31 - error TS2307: Cannot find module './BasePicker.scss' or its corresponding type declarations. +perf-test: 34 import * as stylesImport from './BasePicker.scss'; +perf-test: ~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/pickers/Suggestions/Suggestions.tsx:25:31 - error TS2307: Cannot find module './Suggestions.scss' or its corresponding type declarations. +perf-test: 25 import * as stylesImport from './Suggestions.scss'; +perf-test: ~~~~~~~~~~~~~~~~~~~~ +perf-test: ../../packages/office-ui-fabric-react/src/components/pickers/Suggestions/SuggestionsItem.tsx:8:31 - error TS2307: Cannot find module './Suggestions.scss' or its corresponding type declarations. +perf-test: 8 import * as stylesImport from './Suggestions.scss'; +perf-test: ~~~~~~~~~~~~~~~~~~~~ +perf-test: Found 28 errors. +perf-test: [XX:XX:XX XM] x ------------------------------------ +perf-test: [XX:XX:XX XM] x Error previously detected. See above for error messages. +perf-test: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +perf-test: error Command failed with exit code 1. +vr-tests: [XX:XX:XX XM] x Error detected while running 'ts:esm' +vr-tests: [XX:XX:XX XM] x ------------------------------------ +vr-tests: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/vr-tests/tsconfig.json" +vr-tests: at ChildProcess.exithandler (child_process.js:303:12) +vr-tests: at ChildProcess.emit (events.js:315:20) +vr-tests: at ChildProcess.EventEmitter.emit (domain.js:506:15) +vr-tests: at maybeClose (internal/child_process.js:1021:16) +vr-tests: at Process.ChildProcess._handle.onexit (internal/child_process.js:286:5) +vr-tests: at Process.callbackTrampoline (internal/async_hooks.js:120:14) +vr-tests: [XX:XX:XX XM] x stdout: +vr-tests: [XX:XX:XX XM] x ../../packages/office-ui-fabric-react/src/components/Calendar/Calendar.tsx:22:31 - error TS2307: Cannot find module './Calendar.scss' or its corresponding type declarations. +vr-tests: 22 import * as stylesImport from './Calendar.scss'; +vr-tests: ~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/Calendar/CalendarDay.tsx:32:31 - error TS2307: Cannot find module './Calendar.scss' or its corresponding type declarations. +vr-tests: 32 import * as stylesImport from './Calendar.scss'; +vr-tests: ~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/Calendar/CalendarMonth.tsx:15:31 - error TS2307: Cannot find module './Calendar.scss' or its corresponding type declarations. +vr-tests: 15 import * as stylesImport from './Calendar.scss'; +vr-tests: ~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/Calendar/CalendarYear.tsx:5:31 - error TS2307: Cannot find module './Calendar.scss' or its corresponding type declarations. +vr-tests: 5 import * as stylesImport from './Calendar.scss'; +vr-tests: ~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroup.base.tsx:147:19 - error TS2783: 'key' is specified more than once, so this usage will be overwritten. +vr-tests: 147 key={option.key} +vr-tests: ~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroup.base.tsx:151:19 +vr-tests: 151 {...innerOptionProps} +vr-tests: ~~~~~~~~~~~~~~~~~~~~~ +vr-tests: This spread always overwrites this property. +vr-tests: ../../packages/office-ui-fabric-react/src/components/ChoiceGroup/ChoiceGroupOption/ChoiceGroupOption.base.tsx:82:38 - error TS2554: Expected 1 arguments, but got 2. +vr-tests: 82 {onRenderField(this.props, this._onRenderField)} +vr-tests: ~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/ComboBox/ComboBox.tsx:421:13 - error TS2554: Expected 1 arguments, but got 2. +vr-tests: 421 this._onRenderContainer, +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsColumn.base.tsx:194:14 - error TS2790: The operand of a 'delete' operator must be optional. +vr-tests: 194 delete this._dragDropSubscription; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsColumn.base.tsx:208:14 - error TS2790: The operand of a 'delete' operator must be optional. +vr-tests: 208 delete this._dragDropSubscription; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.base.tsx:132:14 - error TS2790: The operand of a 'delete' operator must be optional. +vr-tests: 132 delete this._subscriptionObject; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsHeader.base.tsx:154:14 - error TS2790: The operand of a 'delete' operator must be optional. +vr-tests: 154 delete this._subscriptionObject; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsRow.base.tsx:109:16 - error TS2790: The operand of a 'delete' operator must be optional. +vr-tests: 109 delete this._dragDropSubscription; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/DetailsList/DetailsRow.base.tsx:147:14 - error TS2790: The operand of a 'delete' operator must be optional. +vr-tests: 147 delete this._dragDropSubscription; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/ExtendedPicker/BaseExtendedPicker.tsx:5:31 - error TS2307: Cannot find module './BaseExtendedPicker.scss' or its corresponding type declarations. +vr-tests: 5 import * as stylesImport from './BaseExtendedPicker.scss'; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/FloatingPicker/BaseFloatingPicker.tsx:2:31 - error TS2307: Cannot find module './BaseFloatingPicker.scss' or its corresponding type declarations. +vr-tests: 2 import * as stylesImport from './BaseFloatingPicker.scss'; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/FloatingPicker/PeoplePicker/PeoplePickerItems/SuggestionItemDefault.tsx:5:31 - error TS2307: Cannot find module '../PeoplePicker.scss' or its corresponding type declarations. +vr-tests: 5 import * as stylesImport from '../PeoplePicker.scss'; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/FloatingPicker/Suggestions/SuggestionsControl.tsx:12:31 - error TS2307: Cannot find module './SuggestionsControl.scss' or its corresponding type declarations. +vr-tests: 12 import * as stylesImport from './SuggestionsControl.scss'; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/FloatingPicker/Suggestions/SuggestionsCore.tsx:5:31 - error TS2307: Cannot find module './SuggestionsCore.scss' or its corresponding type declarations. +vr-tests: 5 import * as stylesImport from './SuggestionsCore.scss'; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/FocusTrapZone/FocusTrapZone.tsx:106:12 - error TS2790: The operand of a 'delete' operator must be optional. +vr-tests: 106 delete this._previouslyFocusedElementOutsideTrapZone; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/GroupedList/GroupedListSection.tsx:174:16 - error TS2790: The operand of a 'delete' operator must be optional. +vr-tests: 174 delete this._dragDropSubscription; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/List/List.tsx:340:12 - error TS2790: The operand of a 'delete' operator must be optional. +vr-tests: 340 delete this._scrollElement; +vr-tests: ~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/MarqueeSelection/MarqueeSelection.base.tsx:88:12 - error TS2790: The operand of a 'delete' operator must be optional. +vr-tests: 88 delete this._scrollableParent; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/MarqueeSelection/MarqueeSelection.base.tsx:89:12 - error TS2790: The operand of a 'delete' operator must be optional. +vr-tests: 89 delete this._scrollableSurface; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/Popup/Popup.tsx:79:12 - error TS2790: The operand of a 'delete' operator must be optional. +vr-tests: 79 delete this._originalFocusedElement; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/SelectedItemsList/SelectedPeopleList/Items/ExtendedSelectedItem.tsx:6:31 - error TS2307: Cannot find module './ExtendedSelectedItem.scss' or its corresponding type declarations. +vr-tests: 6 import * as stylesImport from './ExtendedSelectedItem.scss'; +vr-tests: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/pickers/BasePicker.tsx:34:31 - error TS2307: Cannot find module './BasePicker.scss' or its corresponding type declarations. +vr-tests: 34 import * as stylesImport from './BasePicker.scss'; +vr-tests: ~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/pickers/Suggestions/Suggestions.tsx:25:31 - error TS2307: Cannot find module './Suggestions.scss' or its corresponding type declarations. +vr-tests: 25 import * as stylesImport from './Suggestions.scss'; +vr-tests: ~~~~~~~~~~~~~~~~~~~~ +vr-tests: ../../packages/office-ui-fabric-react/src/components/pickers/Suggestions/SuggestionsItem.tsx:8:31 - error TS2307: Cannot find module './Suggestions.scss' or its corresponding type declarations. +vr-tests: 8 import * as stylesImport from './Suggestions.scss'; +vr-tests: ~~~~~~~~~~~~~~~~~~~~ +vr-tests: Found 28 errors. +vr-tests: [XX:XX:XX XM] x ------------------------------------ +vr-tests: [XX:XX:XX XM] x Error previously detected. See above for error messages. +vr-tests: [XX:XX:XX XM] x Other tasks that did not complete: [ts:commonjs] +vr-tests: error Command failed with exit code 1. +@uifabric/fabric-website: [XX:XX:XX XM] x Error detected while running 'ts:esm' +@uifabric/fabric-website: [XX:XX:XX XM] x ------------------------------------ +@uifabric/fabric-website: [XX:XX:XX XM] x Error: Command failed: /usr/local/bin/node "/office-ui-fabric-react/node_modules/typescript/lib/tsc.js" --pretty --target es5 --outDir lib --module esnext --project "/office-ui-fabric-react/apps/fabric-website/tsconfig.json" +@uifabric/fabric-website: at ChildProcess.exithandler (child_process.js:303:12) +@uifabric/fabric-website: at ChildProcess.emit (events.js:315:20) +@uifabric/fabric-website: at ChildProcess.EventEmitter.emit (domain.js:506:15) +@uifabric/fabric-website: at maybeClose (internal/child_process.js:1021:16) +@uifabric/fabric-website: at Socket. (internal/child_process.js:443:11) +@uifabric/fabric-website: at Socket.emit (events.js:315:20) +@uifabric/fabric-website: at Socket.EventEmitter.emit (domain.js:506:15) +@uifabric/fabric-website: at Pipe. (net.js:674:12) +@uifabric/fabric-website: at Pipe.callbackTrampoline (internal/async_hooks.js:120:14) +@uifabric/fabric-website: [XX:XX:XX XM] x stdout: +@uifabric/fabric-website: [XX:XX:XX XM] x src/components/Nav/Nav.tsx:73:35 - error TS2339: Property 'navWrapper' does not exist on type 'typeof import("*.scss")'. +@uifabric/fabric-website: 73 return
{this._renderPageNav(pages)}
; +@uifabric/fabric-website: ~~~~~~~~~~ +@uifabric/fabric-website: src/components/Nav/Nav.tsx:90:34 - error TS2339: Property 'nav' does not exist on type 'typeof import("*.scss")'. +@uifabric/fabric-website: 90